I am getting NZEC for the solution I submitted for https://www.codechef.com/problems/HS08TEST
I tried using try catch and got WA
This means that some line of my code throws exception but I am not sure which line actually throws it. Need help !
Input format is like this
When you use in.readLine() it reads the whole line from input “30 120.00” , so when you use Integer.parseInt it throws an exception as the argument is not an integer. You need to separate the two numbers.
Use something like
String s=in.readLine().split(" ");
int withdraw = Integer.parseInt(s);
double balance = Double.parseDouble(s);
Thanks @vbt_95 for helping me out. Your solution worked.
Good wishes from India!
No problem. Good wishes from India too