my code was wrong answer
<-------------------------------------------->
/* package codechef; // don’t place package name! */
import java.util.;
import java.lang.;
import java.io.*;
/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
try {
Scanner sc = new Scanner(System.in);
float X = sc.nextInt();// Amount pooja like to withdraw
float Y = sc.nextInt();// Account Balance
float deduct = 0.5f;
float mul = 5;
if((X%mul == 5) ||(X%mul == 0) && (X<=Y))
{
Y = Y-X-deduct;
System.out.println(Y);
} else{
System.out.println(Y);
}
} catch(Exception e) {
return;
}
}
}
<-------------------------------------------------------------------->
question: HS08TEST Problem - CodeChef
I am new in codechef please help.