Strange judgement result.
First, I wrote a program on C++ like this:
#include<stdio.h>
void main(void)
{char c; int t,s=0;
while (!feof())
{scanf("%c",&c);
...
}
...
printf("%i\n",s);
}
Judgement result: Wrong answer #1
After that I wrote same program on Pascal like this:
program roman;
var c:char;
t,s: integer;
begin
s:=0;
while not eof() do
begin
read(c);
...
end;
...
writeln(s);
end.
Program on Pascal got AC. Those "..." are both correct I tested both programs on my own on the keyboard and using freopen. Does anybody know why C++ gets WA and Pascal AC?
Edited by author 09.02.2007 21:21