思路:
- 如果 大于等于 ,就输出 ,因为这时奶龙玩偶有促销,更加便宜。
- 否则就取 ,因为 有可能是小于 的。
代码:
#include<bits/stdc++.h>
#define int long long
using namespace std;
int x,y,z,a;
signed main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>x>>y>>z>>a;
if(a>=y){
cout<<a*z;
}
else{
cout<<min(y*z,a*x);
}
return 0;
}