結果

問題 No.745 letinopia raoha
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2019-01-31 20:07:23
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 11,332 KB
実行使用メモリ 15,340 KB
最終ジャッジ日時 2023-08-10 22:12:35
合計ジャッジ時間 1,907 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,248 KB
testcase_01 AC 74 ms
15,080 KB
testcase_02 AC 74 ms
15,340 KB
testcase_03 AC 75 ms
15,140 KB
testcase_04 AC 76 ms
15,140 KB
testcase_05 AC 75 ms
15,052 KB
testcase_06 AC 78 ms
15,052 KB
testcase_07 AC 76 ms
15,112 KB
testcase_08 AC 77 ms
15,144 KB
testcase_09 AC 77 ms
15,152 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

perfect, great, _, miss = gets.split.map(&:to_i)

if miss == 10
  puts 'Impossible'
  exit
end

score, combo, multiple = 0, 0, 1

great.times do
  combo += 1
  score += 50 * multiple
  multiple *= 2 if (combo % 100).zero?
end

perfect.times do
  combo += 1
  score += 100 * multiple
  multiple *= 2 if (combo % 100).zero?
end

puts 'Possible', score
0