結果

問題 No.745 letinopia raoha
ユーザー stng
提出日時 2022-06-05 18:52:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 533 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 53,884 KB
最終ジャッジ日時 2024-09-21 04:14:19
合計ジャッジ時間 1,122 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c,d = map(int,input().split())
if d >= 10:
    print("Impossible")
    exit()

print("Possible")
scr = 0
fb = True
cmb = 0
while b > 0:
    if b > 100:
        scr += 100*50*pow(2,(cmb//100))
        b -= 100
        cmb += 100
    else:
        scr += b*50*pow(2,(cmb//100))
        cmb += b
        b = 0

while a > 0:
    tmp = 100-(cmb%100)
    if a > tmp:
        scr += tmp*100*pow(2,(cmb//100))
        a -= tmp
        cmb += tmp
    else:
        scr += a*100*pow(2,(cmb//100))
        cmb += a
        a = 0

print(scr)
0