摘要: Problem Description The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprime to n, and this function has... 阅读全文
posted @ 2017-01-14 17:00 Pic 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 素数(质数)的判定 (1)最基本素数判定方法大家熟悉,只用看看2到n(或n的平方根)之间有没有n的约数: #include void main() { int i,n; scanf("%d",&n); for(i=2;i int n,i,j,a[1000001],p[100000],t=0; void main() { scanf("%d",&... 阅读全文
posted @ 2017-01-14 16:48 Pic 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Problem Description Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded.In the field of Cyberground, the posit... 阅读全文
posted @ 2017-01-14 15:15 Pic 阅读(287) 评论(0) 推荐(0) 编辑