結果

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

ソースコード

diff #

a, b, c = map(int, input().split())

l = []
for i in range(-10, a+1):
    for j in range(-10, b+1):
        if (a-i) + (b-j) == c:
            l.append([i, j])

l2 = []
for i, j in l:
    if i + 10*j > 0:
        l2.append(i + 10*j)

if len(l2) == 0:
    print('Impossible')
else:
    print(min(l2))
0