|
|
вернуться в форумWhat is wrong!!! Послано Mr.Li 9 апр 2013 10:37 #include <cstdio> #include <cmath> int main() { unsigned int n,a,m = 0,p = 0; double x; char r[65536]; scanf("%d",&n); while(n--){ scanf("%d",&a); x = (sqrt(double(8*a-7))+1)/2; if (x==int(x)) r[m++] = '1'; else r[m++] = '0'; } n = 0; while(m--) printf("%c ",r[n++]); printf("\n"); return 0; } Re: What is wrong!!! Edited by author 31.03.2014 16:38 |
|
|