Блог пользователя Aaghoz_Daar

Автор Aaghoz_Daar, 9 лет назад, По-английски

Hi every one!

In problem 505A - Подарок мистера Китаюта I submit my code but give me WA. On the other hand, my IDE (Intllij IDEA — JDK8) , ideone and custom test section of Codeforces Accept my Code!!! :/

One code,two Output!!!

I really confused!

Plz see these:

ideone

My submit

who know whats wrong??? :(

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
9 лет назад, # |
Rev. 6   Проголосовать: нравится +17 Проголосовать: не нравится

I replaced

if ((car < 0) || (car == '\n')) break;

with

if ((car < 0) || (car == '\r') || (car == '\n')) break;

and now it failed on test 7 — http://codeforces.com/contest/505/submission/9569366

Why cannot you use simple readLine from BufferedReader?

JavaDoc: http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html#readLine() sorry, but link in wysiwyg is not working for this link

PS: @all: I do not understand, why community here is so unfriendly... 15 guys downvoted, but no-one helped, that's really sad :-/ Remember we all needed help at the beginning...

»
9 лет назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

tnx ;)

Because I always use this class[class kaaveh()] for inputting .

tnx a lot! :D