시간 제한메모리 제한제출정답맞힌 사람정답 비율
1.8 초 1024 MB21150.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:

  1. $1 ≤ a ≤ p$
  2. $1 ≤ b ≤ q$
  3. $c = \frac{a \times b}{a + b}$ is a natural number, and $1 ≤ c ≤ n$, that is the product $a \times b$ is divisible without remainder by the sum $a + b$, and their quotient is less than or equal to $n$.

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 ≤ p, q, n ≤ 10^{10}$

서브태스크

번호배점제한
15

$1 ≤ p, q, n ≤ 2 \times 10^4$

210

$1 ≤ p, q, n ≤ 2.5 \times 10^7$

310

$1 ≤ p, q, n ≤ 2.5 \times 10^8$

410

$1 ≤ p, q, n ≤ 2 \times 10^9$

510

$n = 10^{10}$, $p = q$

610

$n = 10^{10}$

745

예제 입력 1

13 17 5

예제 출력 1

11

채점 및 기타 정보

  • 예제는 채점하지 않는다.