結果

問題 No.745 letinopia raoha
ユーザー wonda_t_coffee
提出日時 2020-02-09 00:17:17
言語 Ruby
(3.4.1)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-10-01 05:33:58
合計ジャッジ時間 1,640 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
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