摘要: http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1468&cid=1142View Code 1 #include<stdio.h> 2 #define N 1000100 3 int a[N] ; 4 int main() 5 { 6 int i, j, count, n ; 7 while(scanf("%d", &n), n!=0) 8 { 9 a[0] = a[1] = 1 ; 10 count = 0 ; 11 for(i... 阅读全文
posted @ 2013-01-29 22:20 yelan@yelan 阅读(162) 评论(0) 推荐(0)
摘要: http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1469&cid=1142View Code 1 #include<stdio.h> 2 #include<math.h> 3 int isprime(long n) 4 { 5 long i,k; 6 k=sqrt(n); 7 for(i=2;i<=k;i++) 8 { 9 if(n%i==0) 10 return 0; 11 } 12 return 1; 13 } 1... 阅读全文
posted @ 2013-01-29 22:11 yelan@yelan 阅读(226) 评论(0) 推荐(0)
摘要: http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1470&cid=1142View Code 1 #include<stdio.h> 2 int main() 3 { 4 int a, b, c, d, e, x, y; 5 int ming, maxg; 6 while(scanf("%d %d %d %d %d", &a, &b, &c, &d, &e)) 7 { 8 if(a==0&&b==0&&c==0&&d 阅读全文
posted @ 2013-01-29 22:00 yelan@yelan 阅读(211) 评论(0) 推荐(0)