Search found 10 matches
- Fri Sep 10, 2010 1:17 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11219 - How old are you?
- Replies: 117
- Views: 36099
Re: 11219 - How old are you?
Your calculation and the way printing output is all wrong.. Read the previous posts and try test cases on it. Your code fails on most of them.. i did a silly mistake in the logic but still it is getting wrong answer though it is matching the output with all the test inputs given.. :( would you plea...
- Fri Sep 10, 2010 12:21 pm
- Forum: Volume 4 (400-499)
- Topic: 445 - Marvelous Mazes
- Replies: 93
- Views: 12901
Re: 445 WA
i'm getting WA for 445 . can anyone help me. #include <stdio.h> int main() { char string[100000],number=0,i=0,j=0; while(gets(string)) { if(string[0]=='\0') { continue; } number=0; for(i=0;string[i]!='\0';i++) { if(string[i]>='0' && string[i]<='9') number+=(string[i]-48); else if((string[i]>...
- Thu Aug 05, 2010 3:45 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11219 - How old are you?
- Replies: 117
- Views: 36099
Re: 11219 - How old are you?
i don't know why am i getting wrong answer for this code...i am getting correct answer for all the given inputs in the forum....what's my fault then.... and there's a line in the question ... Each test case starts with a blank line what does it exactly mean ... do i have to do anything special for i...
- Fri Jul 16, 2010 7:35 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10810 - Ultra-QuickSort
- Replies: 36
- Views: 21806
Re: 10810 - Ultra-QuickSort
Can anyone help me ... i'm getting runtime error for this problem... can anyone tell me what mistake i have done? #include <stdio.h> long long int number[50000]; long long int bubble_sort(long long int *a,long long int cas) { long long int i,j,temp; int flag=1; long long int count=0; for(i=0;( (i<ca...
- Tue Jul 13, 2010 11:14 am
- Forum: Volume 4 (400-499)
- Topic: 494 - Kindergarten Counting Game
- Replies: 119
- Views: 25664
Re: 494 WA
i'm using visual c++ compiler and it is producing correct answer for your input...
does it cause any problem for using two different compilers??
does it cause any problem for using two different compilers??
- Thu Jul 08, 2010 9:34 pm
- Forum: Volume 4 (400-499)
- Topic: 494 - Kindergarten Counting Game
- Replies: 119
- Views: 25664
Re: 494 WA
thnx for da reply ...
but hav u seen my code ... what's wrong there why my code is getting WA
but hav u seen my code ... what's wrong there why my code is getting WA
- Tue Jul 06, 2010 7:20 am
- Forum: Volume 4 (400-499)
- Topic: 494 - Kindergarten Counting Game
- Replies: 119
- Views: 25664
Re: 494 WA
1.should the program print 0 for only one letter input?
2.should i print blank line for a blank input or should i print 0?
thnx
2.should i print blank line for a blank input or should i print 0?
thnx
- Tue Jul 06, 2010 7:16 am
- Forum: Volume 4 (400-499)
- Topic: 494 - Kindergarten Counting Game
- Replies: 119
- Views: 25664
Re: 494 WA
code removed ....
- Sun Jul 04, 2010 11:35 am
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 53527
673 - parenthesis balance
i'm getting wrong answer for the following code ... any help would be appreciated.... is my logic correct for the following code... //parenthesis balance #include <stdio.h> int main() { char ch[128]; int cas,i,j,a,b; int sum1,sum2; scanf("%d",&cas); for(i=0;i<cas;i++) { scanf("%s&...
- Sun Jul 04, 2010 11:24 am
- Forum: Volume 100 (10000-10099)
- Topic: 10035 - Primary Arithmetic
- Replies: 328
- Views: 67122
10035 - primary arithmetic
can anyone please help me with the code below.. i can't understand why am i getting WA //primary arithmetic #include <stdio.h> int main() { unsigned long int a,b; int carry; while(scanf("%lu %lu",&a,&b)==2) { if(a==0 && b==0) break; carry=0; while((a%10)||(b%10)) { if((a%10...