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...

why WA3?
Posted by Vladzick 26 Nov 2007 12:36
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?
Posted by Alias (Alexander Prudaev) 26 Nov 2007 12:47
 Ki < 2^31
you cannot create string of size about 2 GB
answer '1' for positions  1, 2, 4, 7, 11, 16 ....