program lab; var n,i,index : Integer; tmp : String; begin Read(n); i := 1; index := 0; while ( True ) do begin Str(sqr(i),tmp); if n <= index + Length(tmp) then begin tmp := Copy(tmp,n - index,1); break; end; index := index + Length(tmp); i := i + 1; end; writeln(tmp); end.
program lab; var n,i,index : Integer; tmp : String; begin Read(n); i := 1; index := 0; while ( True ) do begin Str(sqr(i),tmp); if n <= index + Length(tmp) then begin tmp := Copy(tmp,n - index,1); break; end; index := index + Length(tmp); i := i + 1; end; writeln(tmp); end.