PersonalCorpus 版 (精华区)
275982 12:31:28 13 Nov 2002 Bozhang,HIT,P.R.China
1209 Pascal Accepted 0.17 sec 53K
program p1209;
var
i:integer;
j,k:extended;
begin
{$IFNDEF ONLINE_JUDGE}
assign(input,'input1209.txt');reset(input);
assign(output,'output1209.txt');rewrite(output);
{$ENDIF}
readln(i);
while (i>0) do begin
dec(i);
readln(k);
k:=(k-1) *2;
j:=trunc(sqrt(k));
if (j*(j-1)=k) or (j*(j+1)=k) then write('1 ') else write('0
');
end;
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.955毫秒