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 1407. One-two, One-two

To Admins
Posted by vetas 29 Dec 2008 16:11
I read N next follow (C#):
    int n=int.Parse(Console.ReadLine().Trim())
and have crash in test 5.

When I read N next follow
    string s=""; string s1="";
    while ((s1=Console.ReadLine())!=null) s+=s1;
    s=s.Trim();
    int n = int.Parse(s);
have Accepted

This is bug (test 5) or no?

Sorry for my bad english

Re: To Admins
Posted by Sandro (USU) 30 Dec 2008 00:47
There were empty lines before the number in the Test 5.
We have fixed all tests in this problem. Now they don't contain leading or trailing spaces and empty lines.

I think, "int.Parse(Console.ReadLine())" should be OK now.
Re: To Admins
Posted by vetas 31 Dec 2008 13:29
Yes, all right
Thanks