|
|
вернуться в форумwrite out the answer cost me too much time,I use pascal,who can help me? Послано lz 5 июл 2003 17:33 Re: this is my short solution Послано ACer 6 июл 2003 18:15 var j,n,i:longint; t,l:extended;
begin read(n); for i:=1 to n do begin read(j); l:=j-1; l:=l*2; t:=trunc(sqrt(l)); t:=t*(t+1)/2; if (t>=j-1)and(abs(t-j+1)<=1e-6) then writeln(1) else writeln(0); end; end. |
|
|