結果

問題 No.825 賢いお買い物
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2021-07-21 00:18:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 76,784 KB
最終ジャッジ日時 2023-09-24 13:00:37
合計ジャッジ時間 3,420 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,172 KB
testcase_01 AC 72 ms
71,256 KB
testcase_02 AC 80 ms
76,440 KB
testcase_03 AC 84 ms
76,284 KB
testcase_04 AC 81 ms
76,456 KB
testcase_05 WA -
testcase_06 AC 72 ms
71,408 KB
testcase_07 AC 82 ms
76,652 KB
testcase_08 AC 81 ms
76,376 KB
testcase_09 AC 80 ms
76,260 KB
testcase_10 AC 83 ms
76,512 KB
testcase_11 AC 80 ms
76,308 KB
testcase_12 AC 79 ms
75,756 KB
testcase_13 AC 73 ms
71,200 KB
testcase_14 AC 75 ms
71,128 KB
testcase_15 AC 80 ms
76,292 KB
testcase_16 AC 80 ms
76,376 KB
testcase_17 AC 74 ms
71,388 KB
testcase_18 AC 83 ms
76,496 KB
testcase_19 AC 80 ms
76,784 KB
testcase_20 AC 79 ms
71,408 KB
testcase_21 AC 76 ms
71,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C = map(int, input().split())

for price in range(1, (A + B * 10) + 1):
    for a in range(A + 1):
        for b in range(B + 1):
            pay = a + 10 * B
            if pay < price:
                continue

            change = pay - price
            if (A - a + (change % 10)) + (B - b + (change / 10)) == C:
                print(price)
                exit()

print('Impossible')
0