简单易懂
2026-07-27 18:08:00
发布于:广东
8阅读
0回复
0点赞
#include<bits/stdc++.h>
#include <iomanip>
using namespace std;
int x,y,n,p;
double a,b;
int main(){
cin>>x>>y>>n>>p;
if(p>=x){a=p-y;}
else{a=p;}
b=p*0.1*n;
if(a>b){std::cout << std::fixed << std::setprecision(2) << b << std::endl;;}//不用管这一大串是什么
if(a==b){ std::cout << std::fixed << std::setprecision(2) << a << std::endl;;}
if(a<b){std::cout << std::fixed << std::setprecision(2) << a << std::endl;;}
return 0;
}



这里空空如也






有帮助,赞一个