Aaghoz_Daar's blog

By Aaghoz_Daar, 9 years ago, In English

Hi every one!

In problem 505A - Mr. Kitayuta's Gift 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??? :(

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
9 years ago, # |
Rev. 6   Vote: I like it +17 Vote: I do not like it

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 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

tnx ;)

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

tnx a lot! :D

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Ok, at least you know now, it's not perfect...