Search found 4 matches
- Mon Dec 04, 2006 5:47 am
- Forum: Volume 100 (10000-10099)
- Topic: 10013 - Super long sums
- Replies: 212
- Views: 45201
10013 WA
I have tried all the test cases on this forum for 10013, but I still keep getting WA. Does anyone have any suggestions on as to how I could fix this code? [code] #include <stdio.h> int num1[1000001], num2[1000001]; int result[1000001]; void addNumbers() { for(int i = 0; i < 1000001; i++) { result[i]...
- Mon Nov 27, 2006 12:45 am
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 36838
495 WA
I got WA for this code... I have checked with all the numbers and they are correct. including the 5000th number #include <stdio.h> void next( int n1[1500], int n2[1500], int n3[1500] ); void pr( int n[1500] ); int n[5001][1500]; int main() { int num, i, j; int temp; for( i = 0; i < 5001; i++ ) { for...
- Tue Nov 07, 2006 8:40 am
- Forum: Volume 4 (400-499)
- Topic: 443 - Humble Numbers
- Replies: 82
- Views: 9282
- Tue Nov 07, 2006 8:39 am
- Forum: Volume 4 (400-499)
- Topic: 443 - Humble Numbers
- Replies: 82
- Views: 9282
443 WA
#include <stdio.h> int main() { int i, j, num; long temp; long humble[5483]; char suffix[2]; suffix[0] = 't'; suffix[1] = 'h'; humble[0] = 1; for(i = 1; i < 5483; i++) { humble[i] = 2100000000; for(j = 0; j < i; j++) { if(humble[j] * 2 > humble[i - 1]) { if(humble[j] * 2 < humble[i]) { humble[i] = h...