A716.减肥过度
2024-12-30 18:43:11
发布于:江苏
10阅读
0回复
0点赞
#include<iostream>
using namespace std;
int main(){
    int a,b,x,y;
    cin>>a>>b;
    bool f=0;
    for(int i=1;i<=3;i++){
        cin>>x>>y;
        int hunger=a,money=b;
        while(hunger>0){
            hunger-=x;
            money-=y;
        }
        if(money>=0) f=1;
    }
    cout<<(f?"YES":"NO");
    return 0;
}
这里空空如也


有帮助,赞一个