2 条题解
-
1
202602zj张轩铭 (张轩铭) LV 7 @ 2026-02-11 19:44:24
#include<bits/stdc++.h> using namespace std; int main(){ int x,y,n,p; cin>>x>>y>>n>>p; double p1=p,m;; if (p>=x){ p1=p-y; } double p2=p*n/10.0; if (p1<p2) { m=p1; }else{ m=p2; } cout<<fixed<<setprecision(2)<<m<<endl; return 0; } -
-1@ 2025-12-13 15:32:03
#include<bits/stdc++.h>
using namespace std;
int main( )
{
int x,n;
double y,p,sum1,sum2;
cin>>x>>y>>n>>p;
sum2=p*n/10.0;
if (p>=x)
{
sum1=p-y;
if (sum1<=sum2)
cout<<fixed<<setprecision(2)<<sum1;
else
cout<<fixed<<setprecision(2)<<sum2;
}
else
cout<<fixed<<setprecision(2)<<sum2;
return 0;
}
- 1
信息
- ID
- 2969
- 难度
- 6
- 分类
- (无)
- 标签
- 递交数
- 244
- 已通过
- 64
- 通过率
- 26%
- 上传者