結果

問題 No.825 賢いお買い物
ユーザー stngstng
提出日時 2022-07-09 16:50:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 87,372 KB
実行使用メモリ 76,620 KB
最終ジャッジ日時 2023-08-30 00:29:13
合計ジャッジ時間 3,208 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,468 KB
testcase_01 AC 68 ms
71,548 KB
testcase_02 AC 75 ms
76,584 KB
testcase_03 AC 77 ms
76,428 KB
testcase_04 AC 77 ms
76,580 KB
testcase_05 AC 72 ms
76,068 KB
testcase_06 AC 70 ms
71,416 KB
testcase_07 AC 77 ms
76,572 KB
testcase_08 AC 77 ms
76,592 KB
testcase_09 AC 75 ms
76,232 KB
testcase_10 AC 76 ms
76,520 KB
testcase_11 AC 74 ms
76,424 KB
testcase_12 AC 73 ms
75,836 KB
testcase_13 AC 70 ms
71,288 KB
testcase_14 AC 69 ms
71,232 KB
testcase_15 AC 77 ms
76,620 KB
testcase_16 AC 75 ms
76,368 KB
testcase_17 AC 70 ms
71,324 KB
testcase_18 AC 76 ms
76,432 KB
testcase_19 AC 76 ms
76,384 KB
testcase_20 AC 71 ms
71,488 KB
testcase_21 AC 71 ms
71,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

okn = a+b*10

for i in range(1,okn+1):
    for j in range(a+1):
        for k in range(b+1):
            if i <= j+k*10:
                tmp = j+k*10-i
                if tmp%10+tmp//10+a-j+b-k == c:
                    print(i)
                    exit()

    

print("Impossible")
0