Exception in thread “main” java.util.InputMismatchException
at java.util.Scanner.throwFor(Scanner.java:864)
at java.util.Scanner.next(Scanner.java:1485)
at java.util.Scanner.nextInt(Scanner.java:2117)
at java.util.Scanner.nextInt(Scanner.java:2076)
at Main.buildList(Main.java:40)
at Main.main(Main.java:69)
Error while default code complie
My code is not giving error its you template which is giving error. I havent written the code yet
The actual input varies from the one that is provided.
You need to simply submit your code.
As it is mentioned that -> (This is not the actual input that will be provided but rather a description of it).
So, you cannot run the code for a sample input.
Just submit your code.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.