## Search found 7 matches

Tue Nov 06, 2012 8:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 57906

### Re: 10035 - Primary Arithmetic

output:
4 carry operations.

is it r8?
Tue Nov 06, 2012 8:20 pm
Forum: Volume 110 (11000-11099)
Topic: 11057 - Exact Sum
Replies: 50
Views: 21292

### 11057 - Exact Sum

Why Wrong Answer?? pls help #include<stdio.h> #include<string.h> int main() { static long long int n,ary[10002],m,i,j,k,val,small,i1,i2; // freopen("F:\\a.txt","r",stdin); // freopen("F:\\b.txt","w",stdout); while(scanf("%lld\n",&n)==1) { for(i=1;i<=n;i++) scanf("%lld",&ary[i]); scanf("%lld",&m);//...
Sun Nov 04, 2012 9:15 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 57906

### 10035 - Primary Arithmetic

Wrong Answer, Pls Help #include<stdio.h> #include<string.h> int main() { static long int ar[100],br[100],i,j,sum,k,extra,cry,len1,len2,w,q; char str1[100],str2[100]; while(scanf("%s%s",&str1,&str2)==2) { if((str1[0]=='0')&&(str2[0]=='0')) break; i=1; j=1; len1=strlen(str1); len2=strlen(str2); for(q...
Mon Sep 24, 2012 4:19 pm
Forum: Volume 115 (11500-11599)
Topic: 11559 - Event Planning
Replies: 29
Views: 9461

### 11559 - Event Planning

Help help pls.. Why wrong answer? :evil: #include<stdio.h> int main() { int n,h,w,p,ary[2000],sum,k,minsum,count; int i,j,flag; long int b; freopen("f:\\input.txt","r",stdin); // freopen("f:\\output.txt","w",stdout); while(scanf("%d%ld%d%d",&n,&b,&h,&w)==4) { if(((n>=1)&&(n<=200))&&((b>=1)&&(b<=5000...
Mon Sep 24, 2012 7:16 am
Forum: Volume 117 (11700-11799)
Topic: 11764 - Jumping Mario
Replies: 2
Views: 3525

### 11764 - Jumping Mario

Why WA????? #include<stdio.h> int main() { int test,i,w,j,size[100],low,high,k; scanf("%d",&test); if(test<30) { for(i=1;i<=test;i++) { scanf("%d",&w); if((w>0)&&(w<50)) { low=0; high=0; for(j=1;j<=w;j++) scanf("%d",&size[j]); for(k=1;k<w;k++) { if(size[k]<size[k+1]) high=high+1; else if(size[k]==si...
Sat Sep 22, 2012 6:06 pm
Forum: Volume 116 (11600-11699)
Topic: 11614 - Etruscan Warriors Never Play Chess
Replies: 13
Views: 4583

### Re: 11614

is it correct code?
which datatype used for this program?
Thu Sep 20, 2012 8:10 pm
Forum: Volume 116 (11600-11699)
Topic: 11614 - Etruscan Warriors Never Play Chess
Replies: 13
Views: 4583

### 11614 - Etruscan Warriors Never Play Chess

Why gave time limit exceed?? #include<stdio.h> int main() { long int n,i,sum,f,x,test,t1; scanf("%ld",&test); for(t1=1;t1<=test;t1++) { sum=0; scanf("%ld",&n); for(i=1;;i++) { sum=sum+i; if(sum==n) { printf("%ld",i); break; } if(sum>n) { x=i-1; printf("%ld",x); break; } } } return 0; }