F.A.Qs Home Discuss ProblemSet Status Ranklist Contest 入门OJ LoginRegister 捐赠本站
Notice:1:欢迎光临本站资源站http://lydsy.youhaovip.com/products,另本站提供各级各类比赛备战资源,有意者请联系Lydsy2012@163.com 2:今后但凡有人恶意卡测评,将封锁其网段IP
Problem 2818. -- Gcd

2818: Gcd

Time Limit: 10 Sec  Memory Limit: 256 MB
Submit: 6579  Solved: 2905
[Submit][Status][Discuss]

Description

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

Input

一个整数N

Output

如题

Sample Input

4

Sample Output

4

HINT

hint

对于样例(2,2),(2,4),(3,3),(4,2)


1<=N<=10^7

Source

湖北省队互测

[Submit][Status][Discuss]

HOME Back