Find the number of pairs (a, b) such that a % b = K
Given two integers N and K where N, K > 0, the task is to find the total number of pairs (a, b) where 1 ? a, b ? N such that a % b = K. Examples: Input: N = 4, K = 2 Output: 2 Only valid pairs are (2, 3) and (2, 4). Input: N = 11, K = 5 Output: 7 Naive approach: Run two loops from 1 to n and coun