|
|
вернуться в форумWA#1 Послано elf 21 апр 2013 16:01 It works on my computer, but judgement result is Wrong Answer. #include <stdio.h> #include <math.h> #define MAXSIZE 65536 int main() { unsigned long int value = 0; int counter = -1; int i = 0; unsigned long int a[MAXSIZE]; while (scanf("%lu", &value) != EOF) { a[++counter] = value; } for (i = counter; i > -1; i--) { printf("%.4f\n", sqrt((double)a[i])); } return 0; } Edited by author 21.04.2013 19:50 Re: WA#1 be confirmed that input limit is covered by your program Re: WA#1 Послано Declow 5 май 2013 00:38 Try to use unsigned long long, because 10^18>2^32 Re: WA#1 the array is too small,you can try global array to solve it ,but it should be large,at least 500000 |
|
|