It's working fine in IDE but got null pointer exception on Codechef.
on the second line "parseFloat" it's getting null pointer exception
can anyone solve this issue?
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
float am = Float.parseFloat(br.readLine());
float bal = Float.parseFloat(br.readLine());
BufferedWriter ot = new BufferedWriter(new OutputStreamWriter(System.out));
if((am <= bal) && am%5 == 0) {
float ball = bal - am;
ball -= 0.50;
String.format("%.5f", ball);
ot.write(String.valueOf(bal));
}