F'ind a pair (a, b) such that a +b
answer please
Answers
Answered by
1
Answer:
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
Similar questions