摘要:
首先要明确分式的二进制表达方式:1 //supposing the fraction is a / b, (a 2 #include 3 #include 4 #include 5 using namespace std; 6 typedef __int64 LL; 7 const int ... 阅读全文
posted @ 2015-09-14 19:24
astoninfer
阅读(159)
评论(0)
推荐(0)
摘要:
求∑φ(i),i≤ n。根据欧拉函数的定义,当a,b互质时,φ(ab)=φ(a)φ(b),若b|a且b是素数,则φ(ab)=b*φ(a)。用素数筛法预处理出1e6之内的所有素数和欧拉函数。http://poj.org/problem?id=2478 1 #include 2 #include 3... 阅读全文
posted @ 2015-09-14 09:59
astoninfer
阅读(157)
评论(0)
推荐(0)

浙公网安备 33010602011771号