fork(3) download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int a;
  8. float b;
  9. cin>>a>>b;
  10. if(a%5==0&&a<=b-0.5) b=b-a-0.50;
  11. cout<<fixed<<setprecision(2)<<b;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3432KB
stdin
30 120.00
stdout
89.50