結果

問題 No.825 賢いお買い物
ユーザー trineutron
提出日時 2020-12-27 02:46:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-25 06:36:05
合計ジャッジ時間 1,822 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c = map(int, input().split())
for i in range(1, a + 10 * b + 1):
    for j in range(a + 1):
        for k in range(b + 1):
            s = j + 10 * k
            if s < i:
                continue
            r = s - i
            if a + b - j - k + r // 10 + r % 10 == c:
                print(i)
                exit()
print('Impossible')
0