Description
Given n, count the number of pairs (a,b) that satisfy the following conditions:
- 1≤a<b≤n.
- a+b divides a×b.
One line containing an integer n.
One line containing an integer representing the answer.
15
4
Hint
| Test |
N |
Test |
N |
| 1 |
≤10 |
11 |
≤5×107 |
| 2 |
≤50 |
12 |
≤108 |
| 3 |
≤103 |
13 |
≤2×108 |
| 4 |
≤5×103 |
14 |
≤3×108 |
| 5 |
≤2×104 |
15 |
≤5×108 |
| 6 |
≤2×105 |
16 |
≤109 |
| 7 |
≤2×106 |
17 |
| 8 |
≤107 |
18 |
≤231−1 |
| 9 |
≤2×107 |
19 |
| 10 |
≤3×107 |
20 |
Source: 2012 CTT mutual test, by ayq.
Translated by ChatGPT 5