|
|
вернуться в форумПоказать все сообщения Спрятать все сообщения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 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. |
|
|