結果

問題 No.825 賢いお買い物
ユーザー stngstng
提出日時 2022-07-09 16:49:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 76,588 KB
最終ジャッジ日時 2023-08-30 00:28:22
合計ジャッジ時間 3,440 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,488 KB
testcase_01 AC 76 ms
71,236 KB
testcase_02 AC 80 ms
76,400 KB
testcase_03 AC 80 ms
76,472 KB
testcase_04 AC 81 ms
76,520 KB
testcase_05 AC 78 ms
75,992 KB
testcase_06 AC 74 ms
71,224 KB
testcase_07 AC 81 ms
76,560 KB
testcase_08 AC 81 ms
76,308 KB
testcase_09 AC 78 ms
76,124 KB
testcase_10 AC 81 ms
76,504 KB
testcase_11 AC 81 ms
76,588 KB
testcase_12 AC 77 ms
76,028 KB
testcase_13 AC 74 ms
71,372 KB
testcase_14 AC 73 ms
71,304 KB
testcase_15 AC 80 ms
76,356 KB
testcase_16 AC 79 ms
76,232 KB
testcase_17 AC 73 ms
71,468 KB
testcase_18 WA -
testcase_19 AC 80 ms
76,352 KB
testcase_20 AC 73 ms
71,052 KB
testcase_21 AC 72 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

okn = a+b*10

for i in range(1,okn):
    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