結果

問題 No.1517 Party Location
ユーザー warm4C0
提出日時 2024-05-25 10:35:16
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 3,282 ms
コンパイル使用メモリ 242,376 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-20 19:34:59
合計ジャッジ時間 4,047 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
    int d, a, b;
    cin >> d >> a >> b;

    int x = 0;
    if (a-b < 0) {
        x = d;
    } else {
        x = 0;
    }

    cout << (a-b)*x+b*d << endl;

    return 0;
}
0