2 Checker for NEERC'2006 Problem X: Xtrapolation
\r
3 (C) Andrew Stankevich
\r
19 while not ans.seekeof do begin
\r
20 if (ouf.seekeof) then
\r
21 Quit(_PE, 'not enough numbers');
\r
24 ja := ans.readstring;
\r
25 pa := ouf.readstring;
\r
27 if not (pa[1] in ['-', '0'..'9']) then
\r
28 Quit(_PE, 'invalid character in answer');
\r
30 for i := 2 to length(pa) do
\r
31 if not (pa[i] in ['0'..'9']) then
\r
32 Quit(_PE, 'invalid character in answer');
\r
35 Quit(_WA, format('number %d - expected: %s, found: %s', [ind, ja, pa]));
\r
38 if not ouf.seekeof then
\r
39 Quit(_PE, 'too many numbers');
\r
41 Quit(_OK, format('%d numbers', [ind]));
\r