Search found 2 matches
- Tue Sep 27, 2005 4:06 pm
- Forum: Volume 4 (400-499)
- Topic: 402 - M*A*S*H
- Replies: 56
- Views: 13497
I got PE in 402
I got PE in 402........ #include <stdio.h> int array[50]; int main() { int total,remain,i,num,count,j,s=1; while(scanf("%d",&total)==1) { scanf("%d",&remain); for(i=0;i<20;i++) { scanf("%d",&num); count=0; for(j=0;j<total;j++) { if(total==remain) break; if(array[j]==0) { count++; if(count==num) { ar...
- Sat Sep 24, 2005 11:03 am
- Forum: Volume 108 (10800-10899)
- Topic: 10892 - LCM Cardinality
- Replies: 25
- Views: 8387
10892
Who can help me >< .... Although I can deal with the sample input, I got WA. ************************************** #include <stdio.h> #include <math.h> long int lcm(long int,long int); int main() { long int count=0,d=0,i=0,total=0,half=0; long int a[10000],b[10000]; while(1) { total=0; count=0; sca...