【題解】AtCoder ABC 164B – Battle

【題目敘述】https://atcoder.jp/contests/abc164/tasks/abc164_b

#include <iostream>
using namespace std;

int a, b, c, d;

int main() {
    cin >> a >> b >> c >> d;
    while (1){
        c -= b;
        if (c <= 0){
            cout << "Yes\n";
            break;
        }
        a -= d;
        if (a <= 0){
            cout << "No\n";
            break;
        }
    }
}

分享本文 Share with friends