|
|
вернуться в форумWhat the heck is wrong? #include <stdio.h> #include <math.h> int N, K; int main(void) { for(scanf("%d", &N); N; N --) { scanf("%d", &K); -- K; if (fabs(floor(sqrt(1 + 8 * K)) - sqrt(1 + 8 * K)) < 1E-5) printf("1 "); else printf("0 "); } printf("\n"); return 0; } Re: What the heck is wrong? ACed! |
|
|