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 5284KB
stdin
100.4
300.2
60.6
70.5
stdout
50.2