Search found 3 matches

by Sabrina Haque
Sun Jan 25, 2015 5:57 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30831

Re: 488 - Triangle Wave

got an AC #include<stdio.h> int main() { int test_case,frequency,amplitude,i,j,k,m; scanf("%d",&test_case); printf("\n"); for(i=0;i<test_case;i++) { scanf("%d",&litude); scanf("%d",&frequency); printf("\n"); for(m=0;m<frequency;m++) { for(j=1;j<=amplitude;j++) { for(k=0;k<j;k++) printf("%d",j); p...
by Sabrina Haque
Sat Jan 24, 2015 10:24 am
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 17639

Re: 11479 - Is this the easiest problem?

got WA #include<stdio.h> int main() { int test_case,i; long long int a,b,c; scanf("%d",&test_case); for(i=1;i<=test_case;i++) { scanf("%llu %llu %llu",&a,&b,&c); if(a>=b+c || b>=a+c || c>=a+b || a<=0 || b<=0 || c<=0) printf("case %d: Invalid\n",i); else if(a==b && b==c) printf("case %d: Equilateral\...
by Sabrina Haque
Sat Jan 24, 2015 10:04 am
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 18857

Re: 10370 - Above Average

why getting WA? :( #include<stdio.h> int main() { int C,i,j,count; int grade[1002]; float percentage,sum,avrg_grade,N; scanf("%d",&C); for(i=0;i<C;i++) { sum=0; count=0; avrg_grade=0; scanf("%d",&N); for(j=0;j<N;j++) { scanf("%d",&grade[j]); } for(j=0;j<N;j++) { sum=sum+grade[j]; } avrg_grade=sum/N;...

Go to advanced search