luogu#P16421. [IATI 2022] Divide
[IATI 2022] Divide
Problem Description
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.cpp, that given the three numbers and , computes the number of interesting pairs.
Input Format
The only line of the standard input contains the numbers and .
Output Format
On the single line of the standard output, print the number of interesting pairs. It is guaranteed that the answer less than .
13 17 5
11
Hint
Constraints
Subtasks
| No. | Additional constraints | Points |
|---|---|---|
| 1 | 5 | |
| 2 | 10 | |
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | – | 45 |