TouchStone
  Please Login
Login Sign Up
距离明年CSP第一轮: ??天 距离CSP第二轮: ??天 距离NOIP还有: ??天
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P2898
  • Problem
  • P2898【2012湖北省队互测week1】Gcd
    Limits : Time Limit : 20000 MS   Memory Limit : 265536 KB
    Description

    给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的
    数对(x,y)有多少对.

    Input Format

    一个整数N

    Output Format

    如题

    Sample Input

    4

    Sample Output

    4

    Hint

    样例解释:
    (2,2),(2,4),(3,3),(4,2)

    数据范围:
    1<=N<=107


    Source  BZOJ2818,感谢nodgd放题并提供坑出翔的数据