Wrong Answer

In reply to my solution in the ATM Problem, my answer gets rejected with a “Wrong Answer”.
Link to the problem:

Here is the code:

#include<bits/stdc++.h>

using namespace std;

int main()

{

int x;

double y;

cin>>x;

cin>>y;



if((x%5==0) && (x<y+0.5))

{

double bal=y-(x+0.5);

cout<<fixed<<setprecision(2)<<bal;

}

else{

    cout<<fixed<<setprecision(2)<<y;

}

return 0;

}