随笔分类 -  数学

摘要:参考:http://en.wikipedia.org/wiki/Euler%27s_totient_functionView Code 1 #include<stdio.h> 2 3 int main() 4 { 5 int n,i; 6 bool flag; 7 while(scanf("%d",&n) != EOF) 8 { 9 int t=n;10 for(i=2;i<=t;++i)11 {12 flag=0;13 if(t%i==0)14 {15 ... 阅读全文
posted @ 2012-04-04 15:19 知行执行 阅读(197) 评论(0) 推荐(0)
摘要://10的8次方对 10003 mod 是 9 这是为什么要 乘以9了View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 5 char a[1000001]; 6 7 int main() 8 { 9 int t,zero,sum;10 int num,len,i;11 scanf("%d",&t);12 while(t--)13 {14 scanf("%s",a);15 sum=0;16 zero = 1;17 l 阅读全文
posted @ 2012-04-02 10:52 知行执行 阅读(228) 评论(0) 推荐(0)