|
|
back to boardwhy i get WA on test 3?(C) #include <stdio.h> #include <math.h> main() { int a,x[65535],i,t,delta; float x1; scanf("%d",&a); for( i = 0 ; i < a ; i++ ) scanf("%d",&x[i]); for( i = 0 ; i < a ; i++ ) { t = (x[i] - 1) * 2; delta = 1 + 4 * t; x1 = sqrt(delta); printf("%d ",fmod(x1,1.0) == 0); } return 0; } |
|
|