88分,sos
查看原帖
88分,sos
1643406
shenliyan楼主2025/1/19 21:58
#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    int a[4],b[4],minn=100001;
    for(int i=1;i<=3;i++){
        cin>>a[i]>>b[i];
        int s=0;
        if(n%a[i]==0)s=n/a[i]*b[i];
        else s=(n/a[i]+1)*b[i];
        if(s<minn)minn=s;
    }
    cout<<minn;
    return 0;
}
2025/1/19 21:58
加载中...