fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. float v,g,m,n,i,j,x;
  7. cin>>v;
  8. cin>>g;
  9. cin>>m;
  10. cin>>n;
  11. i=0.5*v;
  12. if(g<300) j=m;
  13. else j=n;
  14. x=min(i,j);
  15. printf("%.1f",x);
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5324KB
stdin
99.8
200.9
60.2
70.1
stdout
49.9