+ 1
Is there anyone kind enough to tell what's wrong with my Java code?
https://code.sololearn.com/cv4SzViREzJ3/?ref=app I think I failed at splitting input into an array.. but I can't find what's wrong with my code. I already solved Balconies and Ballpark orders with split, so I just applied the same split code in this case, too. I'll appreciate any comments!!
3 odpowiedzi
+ 3
Instead of input.next() try:
input.nextLine();
+ 3
And you should move the final if statement after the for loop
+ 2
thank you so much!!! I changed input.next() into input.nextLine() and moved if statement and then it worked!!!