結果

問題 No.218 経験値1.5倍
ユーザー kichirb3
提出日時 2018-03-04 22:58:29
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 618 bytes
コンパイル時間 657 ms
コンパイル使用メモリ 71,652 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-17 13:07:56
合計ジャッジ時間 1,985 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

// No.218 経験値1.5倍
// https://yukicoder.me/problems/no/218
//
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;

string solve(int a, int b, int c);


int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    int a, b, c;
    cin >> a >> b >> c;
    string ans = solve(a, b, c);
    cout << ans << endl;
}

string solve(int a, int b, int c) {
    int normal = ceil(static_cast<double>(a) / b);
    int campaign = ceil(static_cast<double>(a) / c);

    if ((normal * 2 / 3) >= campaign)
        return "YES";
    else
        return "NO";
}
0