提交时间:2024-01-23 16:28:19
运行 ID: 125144
#include <bits/stdc++.h> #pragma GCC optimize(3) using namespace std; long long s1; double p,w,d,f,s; int main() { cin>>p>>w>>s; s1=(int)(s/250); switch(s1) { case 0:d=0;break; case 1:d=0.02;break; case 2:d=0.05;break; case 3:d=0.05;break; case 4:d=0.08;break; case 5:d=0.08;break; case 6:d=0.08;break; case 7:d=0.08;break; case 8:d=0.1;break; case 9:d=0.1;break; case 10:d=0.1;break; case 11:d=0.1;break; default :d=0.15;break; } f=p*w*s*(1-d)-1; printf("%.21f",f); return 0; }