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

I have got a question concerning TASK 1209. Please help me if you can.
Posted by Kirill_1984 6 May 2014 19:59
Here is the code for the mentioned task. I use Dev-Pascal and when I run it on my computer there is no any problem, but when I send it to the server the following error occurs:

"Runtime error (access violation)"

MY CODE:

program TASK_1209;
var
b, x, y: string;
a: real;
i, n, w, k: integer;
begin
x := '1' + x;
for i:=1 to 10 do begin
a := exp(ln(10) * i);
str(trunc(a), b);
x := x + b;
end;
readln(k);
n := 0;
repeat
n := n + 1;
readln(w);
y := y + x[w] + ' ';
until n = k;
write(y);
readln;
end.