結果

問題 No.825 賢いお買い物
ユーザー kohei2019kohei2019
提出日時 2022-04-20 21:43:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 1,916 ms
コンパイル使用メモリ 86,664 KB
実行使用メモリ 76,376 KB
最終ジャッジ日時 2023-09-02 17:09:35
合計ジャッジ時間 4,132 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,172 KB
testcase_01 AC 74 ms
71,252 KB
testcase_02 AC 82 ms
76,312 KB
testcase_03 AC 79 ms
76,040 KB
testcase_04 AC 82 ms
76,132 KB
testcase_05 AC 80 ms
75,628 KB
testcase_06 AC 78 ms
71,072 KB
testcase_07 AC 84 ms
76,084 KB
testcase_08 AC 87 ms
76,200 KB
testcase_09 AC 80 ms
75,812 KB
testcase_10 AC 83 ms
76,176 KB
testcase_11 AC 83 ms
75,980 KB
testcase_12 AC 77 ms
75,600 KB
testcase_13 AC 75 ms
71,236 KB
testcase_14 AC 75 ms
71,280 KB
testcase_15 AC 82 ms
76,376 KB
testcase_16 AC 79 ms
76,164 KB
testcase_17 AC 74 ms
71,024 KB
testcase_18 AC 83 ms
76,200 KB
testcase_19 AC 82 ms
76,200 KB
testcase_20 AC 74 ms
71,156 KB
testcase_21 AC 76 ms
71,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(1,A+B*10+1):
    for j in range(A+1):
        for k in range(B+1):
            if i <= j+k*10:
                rm = (j+k*10)-i
                a = rm//10 + rm%10
                if a+(A-j)+(B-k) == C:
                    print(i)
                    exit()
print('Impossible')
0