F.A.Qs Home Discuss ProblemSet Status Ranklist Contest 入门OJ LoginRegister
Problem 2671. -- Calc

2671: Calc

Time Limit: 10 Sec  Memory Limit: 128 MB
Submit: 706  Solved: 351
[Submit][Status][Discuss]

Description

  给出N,统计满足下面条件的数对(a,b)的个数:
  1.1<=a<b<=N
  2.a+b整除a*b
 

Input

 一行一个数N

 

Output

 一行一个数表示答案

Sample Input

15

Sample Output

4

HINT

数据规模和约定

Test N Test N

1 <=10 11 <=5*10^7

2 <=50 12 <=10^8

3 <=10^3 13 <=2*10^8

4 <=5*10^3 14 <=3*10^8

5 <=2*10^4 15 <=5*10^8

6 <=2*10^5 16 <=10^9

7 <=2*10^6 17 <=10^9

8 <=10^7 18 <=2^31-1

9 <=2*10^7 19 <=2^31-1

10 <=3*10^7 20 <=2^31-1


Source

[Submit][Status][Discuss]

HOME Back