結果

問題 No.825 賢いお買い物
ユーザー gamer0819
提出日時 2019-06-10 22:43:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 55,384 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-06 00:59:48
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 10 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    int price = 0;
    int rest = a+b;
    while (rest>c) {
        if (rest>b) price += 1;
        else price += 10;
        rest--;
    }
    cout << price << endl;
    return 0;
}
0