Search found 3 matches

Mon Jan 14, 2013 6:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 40947

10013- Super long sums-again & again WA plz help...

#include<stdio.h> #include<string.h> int a[1000001],b[1000001],sum1[1000001]; int main() { long int t,m,i,j,sum; scanf("%ld",&t); printf("\n"); for(i=0;i<t;i++) { scanf("%ld",&m); for(j=0;j<m;j++) scanf("%d %d",&a[j],&b[j]); sum=0; for(j=m-1;j>=0;j--) { sum=a[j]+b[j]+sum; sum1[j]=sum%10; sum=sum/10;...
Fri Jan 11, 2013 11:13 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 40947

10013 - Super long sums,i got it WA more time

#include<stdio.h> #include<string.h> int a[1000001],b[1000001],sum1[1000001]; int main() { long int t,m,i,j,sum; scanf("%ld",&t); for(i=0;i<t;i++) { scanf("%ld",&m); for(j=0;j<m;j++) scanf("%d %d",&a[j],&b[j]); sum=0; for(j=m-1;j>=0;j--) { sum=a[j]+b[j]+sum; sum1[j]=sum%10; sum=sum/10; } for(j=0;j<m...
Fri Jan 11, 2013 11:00 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 44606

623-500! i got it WA plz anyone help me

#include<stdio.h> #include<string.h> int fact(int i); char x[120005]; int len; int main() { int n,i; while(scanf("%d",&n)==1) { //if(n>500) //continue; printf("%d!\n",n); if(n==0 || n==1) { printf("1\n",n); continue; } x[0]='1'; x[1]='\0'; len=1; for(i=2;i<=n;i++) fact(i); for(i=len-1;i>=0;i--) prin...