Search found 4 matches
- Wed Oct 27, 2010 5:23 am
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 38642
Re: WA 488
Hi dewsworld You have a problem with '\n' newline. For this input 4 1 9 9 1 1 1 9 9 your output 1 1 1 1 1 1 1 1 1 1 22 333 4444 55555 666666 7777777 88888888 999999999 88888888 7777777 666666 55555 4444 333 22 11 1 22 333 4444 55555 666666 7777777 88888888 999999999 88888888 7777777 666666 55555 444...
- Wed Oct 27, 2010 5:06 am
- Forum: Volume 3 (300-399)
- Topic: 343 - What Base Is This?
- Replies: 72
- Views: 23171
Re: 343 Runtime Error Not Even WA (Again even using C++)
Hi dejavu_logic try to change your char *val1 = (char *)malloc(sizeof(char) * 20), *val2 = (char *)malloc(sizeof(char) * 20); with this one char val1[25],val2[25]; and don't forget to delete free(val1); free(val2); and also, put a space between %s%s in the argument of your scanf... I have tried to c...
- Mon Apr 12, 2010 5:50 am
- Forum: Volume 3 (300-399)
- Topic: 389 - Basically Speaking
- Replies: 94
- Views: 24760
Re: 389 - 8 months? WA
@aaa111 For input: 0 10 12 Your program give output : " 0 ", And for input: FF 16 2 Your program give output: " Error". While the output should be " 0" and " ERROR" :D Had trying to fix this issue, your code will be accepted. Good luck! :)
- Sat Aug 09, 2008 7:14 am
- Forum: Volume 114 (11400-11499)
- Topic: 11461 - Square Numbers
- Replies: 15
- Views: 7666
11461 - Square Numbers
It's been 2 weeks since the first time i tried to solve this problem, but i keep getting WA... #include <stdio.h> main() { long a,b,i,j;int k,n; scanf("%ld %ld",&a,&b);k = 0; while (a!=0 || b!=0){ n = 0;k++;if(k!=1)printf("\n"); for(i=1;i*i<a;i++); for(j=i;j*j<=b;j++)n++;...