結果

問題 No.745 letinopia raoha
ユーザー 👑 obakyanobakyan
提出日時 2019-04-14 00:40:41
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 5,152 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-13 14:43:10
合計ジャッジ時間 1,010 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 1 ms
4,352 KB
testcase_03 AC 1 ms
4,352 KB
testcase_04 AC 1 ms
4,352 KB
testcase_05 AC 1 ms
4,352 KB
testcase_06 AC 1 ms
4,352 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c,d=io.read("*n","*n","*n","*n")
if(10 <= d) then print("Impossible")
else
  score = 0
  base = 50
  while(100 <= b) do
    score = score + 100 * base
    base = base * 2
    b = b - 100
  end
  score = score + b * base
  arem = math.min(a, 100 - b)
  base = base * 2
  score = score + arem * base
  base = base * 2
  a = a - arem
  while(100 <= a) do
    score = score + 100 * base
    base = base * 2
    a = a - 100
  end
  score = score + a * base
  print("Possible")
  print(score)
end
0