摘要: Problem DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 #include#includeint s[32767],num=1;bool u[32767];void preper(){ int i,j; memset(u,true,sizeof(u)); for(i=2;i32767) break; u[i*s[j]]=false; if(i%... 阅读全文
posted @ 2014-01-21 21:10 段少 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionEverybody in the Prime Land is using a prime base number system. In this system, each positive integer x is represented as follows: Let {pi}i=0,1,2,... denote the increasing sequence of all prime numbers. We know that x > 1 can be represented in only one way in the form of prod 阅读全文
posted @ 2014-01-21 20:45 段少 阅读(400) 评论(0) 推荐(0) 编辑