結果

問題 No.745 letinopia raoha
ユーザー iad_2889iad_2889
提出日時 2019-05-10 09:58:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 533 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-09-14 17:51:04
合計ジャッジ時間 1,073 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,828 KB
testcase_01 AC 16 ms
7,932 KB
testcase_02 AC 15 ms
7,884 KB
testcase_03 AC 16 ms
7,936 KB
testcase_04 AC 15 ms
7,888 KB
testcase_05 AC 16 ms
7,796 KB
testcase_06 AC 15 ms
7,888 KB
testcase_07 AC 15 ms
7,816 KB
testcase_08 AC 15 ms
7,820 KB
testcase_09 AC 15 ms
7,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B,C,D = map(int,input().split())
if D >= 10:
    print("Impossible")
else:
    score = 0
    chain = 1
    while B >= 100:
        score+=50 * 100 * chain
        chain*=2
        B-=100
    score+=50 * B * chain
    combo = 100 - B
    if A < combo:
        score+=100 * A * chain
    else:
        score+=100 * combo * chain
        A-=combo
        chain*=2
        while A >= 100:
            score+=100 * 100 * chain
            chain*=2
            A-=100
        score+=100 * A * chain
    print("Possible")
    print(score)
0