| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1.8 초 | 1024 MB | 2 | 1 | 1 | 50.000% |
Who doesn’t love math 🙂
Let $p$, $q$ and $n$ be natural numbers. We will say that a pair of natural numbers $(a, b)$ is interesting when:
The goal of this task is simple - find the number of interesting pairs!
Write a program divide, that given the three numbers $p$, $q$ and $n$, computes the number of interesting pairs.
The only line of the standard input contains the numbers $p$, $q$ and $n$.
On the single line of the standard output, print the number of interesting pairs. It is guaranteed that the answer less than $10^{18}$.
| 번호 | 배점 | 제한 |
|---|---|---|
| 1 | 5 | $1 ≤ p, q, n ≤ 2 \times 10^4$ |
| 2 | 10 | $1 ≤ p, q, n ≤ 2.5 \times 10^7$ |
| 3 | 10 | $1 ≤ p, q, n ≤ 2.5 \times 10^8$ |
| 4 | 10 | $1 ≤ p, q, n ≤ 2 \times 10^9$ |
| 5 | 10 | $n = 10^{10}$, $p = q$ |
| 6 | 10 | $n = 10^{10}$ |
| 7 | 45 |
13 17 5
11