what is wrong?

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class atm {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws NumberFormatException 
	 */
	public static void main(String[] args) throws NumberFormatException, IOException {
		
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String[] inp=br.readLine().split(" ");;
		double x=Double.parseDouble(inp[0]);
		double y=Double.parseDouble(inp[1]);
		
		
		if((x<y+0.5)&&(x%5==0))
			y=y-x-0.5;
		
		
			System.out.printf("%.2f\n",y);
		}
	}
}

what is wrong in my code? i keep getting wrong answer on submission. the question is HS08TEST

See this (#2) test case - http://ideone.com/dUF3i7

2 Likes

thanks! :smiley: