getting the expected output but codechef is displaying wrong answer!!!

import java.util.Scanner;
import java.text.DecimalFormat;
import java.lang.*;
class Atm{
public static void main(String[]ar){
Scanner s=new Scanner(System.in);
short a;
DecimalFormat df = new DecimalFormat("#,###,#### 0.00");
a=s.nextShort();
float p;
p=s.nextFloat();
if(a>(int)p) System.out.println(“Insufficient Funds”);
else if(a%5==0) {
p=(int)p-a-0.50f;
System.out.println(df.format§);}
else if(a%5!=0) System.out.println(df.format§);
}}

Well you dont have to print the line “insufficient funds”.

adithyajnts you just need to print the output. No extra statements. No need to print “insufficient funds”.

Also, if you are getting correct output for the given it doesn’t mean that it will work for all the test case. So always try your code for different test cases.

//