|
|
back to boardwhy WA3? var s,s1,s2:string; a:array[1..65536] of integer; i,n:longint; begin readln(n); for i:=1 to n do readln(a[i]); s1:='1'; for i:=1 to 100 do begin s:=s+s1; s1:=s1+'0'; end; for i:=1 to n do writeln(copy(s,a[i],1)); readln; end. Re: why WA3? Ki < 2^31 you cannot create string of size about 2 GB answer '1' for positions 1, 2, 4, 7, 11, 16 .... |
|
|