摘要:
View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define N 10001 5 6 int f[N], value[3]; 7 int main() 8 { 9 int i, j, V, ncases;10 11 scanf("%d", &ncases); 12 while( ncases-- )13 { 14 scanf("%d",&V); 15 value[0] = 150;16 ... 阅读全文
摘要:
View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #include<math.h> 5 6 int a[125][125]; 7 8 int main() 9 { 10 int n, i, j, k, num; 11 12 while( scanf("%d",&n) != EOF)13 {14 memset(a,0,sizeof(a)); 15 for(i=0; i<=n; i++)16 {17 a[i... 阅读全文
摘要:
View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #include<math.h> 5 #define N 1000000 6 7 long long a[N]; 8 int gcd(int n,int m) 9 {10 if(m == 0)11 return n;12 else13 return gcd(m,n%m); 14 }15 16 int Lcm(int a,int b)17 {18 return a/gcd(a,b)*b;//... 阅读全文