結果
問題 |
No.745 letinopia raoha
|
ユーザー |
![]() |
提出日時 | 2020-09-27 20:41:51 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 250 bytes |
コンパイル時間 | 128 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-30 12:54:32 |
合計ジャッジ時間 | 1,680 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 8 |
コンパイルメッセージ
Main.rb:4: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
A, B, C, D = gets.split.map(&:to_i) if D >= 10 puts -1 exit end combo = 0 score = 0 (A + B).times do |i| bonus = combo / 100 if i < B score += 50 * 2.pow(bonus) else score += 100 * 2.pow(bonus) end combo += 1 end puts score