Divide
시간 제한1.8초메모리 제한1024 MB
1 이상 p 이하인 a와 1 이상 q 이하인 b 중에서 a*b가 a+b로 나누어떨어지고 그 몫이 n 이하인 쌍의 수를 구한다.
문제
Who doesn’t love math 🙂
Let , and be natural numbers. We will say that a pair of natural numbers is interesting when:
- is a natural number, and , that is the product is divisible without remainder by the sum , and their quotient is less than or equal to .
The goal of this task is simple - find the number of interesting pairs!
Write a program divide, that given the three numbers , and , computes the number of interesting pairs.
입력
The only line of the standard input contains the numbers , and .
출력
On the single line of the standard output, print the number of interesting pairs. It is guaranteed that the answer less than .