|
@@ -4,20 +4,27 @@
|
|
contributed by Ales Katona
|
|
contributed by Ales Katona
|
|
modified by Daniel Mantione
|
|
modified by Daniel Mantione
|
|
modified by Steve Fisher
|
|
modified by Steve Fisher
|
|
|
|
+ modified by Vincent Snijders
|
|
}
|
|
}
|
|
|
|
|
|
{$iochecks off}
|
|
{$iochecks off}
|
|
|
|
|
|
var
|
|
var
|
|
num, tot: longint;
|
|
num, tot: longint;
|
|
|
|
+ s: string[128];
|
|
textbuf: array[0..8191] of char;
|
|
textbuf: array[0..8191] of char;
|
|
|
|
+ infile: ^text;
|
|
|
|
|
|
begin
|
|
begin
|
|
- settextbuf(input, textbuf);
|
|
|
|
|
|
+ infile := @input;
|
|
|
|
+ settextbuf(infile^, textbuf);
|
|
|
|
+ tot := 0;
|
|
repeat
|
|
repeat
|
|
- readLn( num );
|
|
|
|
- tot += num
|
|
|
|
- until eof;
|
|
|
|
|
|
+ readLn(infile^, s);
|
|
|
|
+ val(s, num);
|
|
|
|
+ tot := tot + num
|
|
|
|
+ until eof(infile^);
|
|
writeLn(tot)
|
|
writeLn(tot)
|
|
end.
|
|
end.
|
|
|
|
|
|
|
|
+
|