ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1209. 1, 10, 100, 1000...

не проходит 3 тест.подскажите пожалуйста,что тут не так!
Posted by Kety Pirozhkova 2 Dec 2017 20:45
не проходит 3 тест.подскажите пожалуйста,что тут не так!
var i,a,p,n,l,fl:integer;
Var k:array [1 .. 65536]of Integer ;
begin
read(n);

for l:=1 to n do
  begin
   readln(p);a:=1;fl:=0;
   for i:=1 to 31 do
    begin
     if a=p then begin fl:=1;break; end else fl:=0;
     a:=a+i; end;
   if fl=1 then k[l]:=1
           else k[l]:=0;
   end;
for l:=1 to n do write(k[l],' ');
end.