結果

問題 No.745 letinopia raoha
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-02-09 00:17:17
言語 Ruby
(3.3.0)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 16,256 KB
最終ジャッジ日時 2024-04-08 11:44:21
合計ジャッジ時間 2,135 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
16,256 KB
testcase_01 AC 89 ms
16,256 KB
testcase_02 AC 92 ms
16,256 KB
testcase_03 AC 90 ms
16,256 KB
testcase_04 AC 90 ms
16,256 KB
testcase_05 AC 100 ms
16,256 KB
testcase_06 AC 93 ms
16,256 KB
testcase_07 AC 94 ms
16,256 KB
testcase_08 AC 91 ms
16,256 KB
testcase_09 AC 95 ms
16,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - c
Syntax OK

ソースコード

diff #

a, b, c, d = gets.chomp.split.map(&:to_i)

if d == 10
  puts "Impossible"
  exit
end

ans = 0
combo = 0

b.times do
  combo += 1
  ans += 50 * 2**((combo - 1) / 100)
end
a.times do
  combo += 1
  ans += 100 * 2**((combo - 1) / 100)
end
puts "Possible"
puts ans
0