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 1877. Bicycle Codes

WA in test 3
Posted by Saimon 13 Nov 2011 01:56
This is my programm.
var cod1,cod2:string[4];
    x1,mis:integer;
    ans,b:boolean;
begin
read(cod1);
read(cod2);
val(cod1,x1,mis);
b:=odd(x1);
ans:=(x1=0) or not b;
val(cod2,x1,mis);
b:=odd(x1);
if ans or b then write('yes') else write('no');
end.

What is input in test 3? I think to this programm is right.
Re: WA in test 3
Posted by [SESC USU]Rudnev Vladimir 13 Nov 2011 11:10
By the first: not read(cod1), but readln(cod1) and the same with cod2.
Also you can read this two numbers like Integer, but not string.

and try tests 0001 0001 answer: "yes", and 0002 0002 answer: "yes"