repo.or.cz
/
and.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding some more judges, here and there.
[and.git]
/
NEERC
/
xtra
/
interact.dpr
blob
2500dcb17b26dff957cb7b1f8e0d8db4c1b26c11
1
(*
\r
2
Interaction for NEERC'2008 Problem X: Xtrapolation
\r
3
(C) Andrew Stankevich
\r
4
*)
\r
5
\r
6
{$O+,Q+,R+}
\r
7
{$APPTYPE CONSOLE}
\r
8
\r
9
program interact;
\r
10
var
\r
11
fin, fout: text;
\r
12
x: int64;
\r
13
s: string;
\r
14
\r
15
begin
\r
16
reset(fin, 'xtra.in');
\r
17
rewrite(fout, 'xtra.out');
\r
18
\r
19
while true do begin
\r
20
readln(fin, x);
\r
21
writeln(x);
\r
22
flush(output);
\r
23
\r
24
if x = 0 then
\r
25
break;
\r
26
\r
27
readln(s);
\r
28
writeln(fout, s);
\r
29
flush(fout);
\r
30
end;
\r
31
\r
32
close(fin);
\r
33
close(fout);
\r
34
end.
\r