結果

問題 No.35 タイパー高橋
ユーザー quilt-tailsquilt-tails
提出日時 2016-11-03 18:15:42
言語 Ruby
(3.3.0)
結果
AC  
実行時間 84 ms / 5,000 ms
コード長 306 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 11,412 KB
実行使用メモリ 15,556 KB
最終ジャッジ日時 2023-08-16 13:21:13
合計ジャッジ時間 1,234 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,368 KB
testcase_01 AC 82 ms
15,304 KB
testcase_02 AC 83 ms
15,556 KB
testcase_03 AC 83 ms
15,284 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
success = 0
failed = 0
n.times do
  a, b = gets.chomp.split
  a = a.to_i
  b = b.count("a-z")
  need_time = b / 0.012
  a = need_time if a > need_time
  max_string = (a * 0.012).floor
  success += max_string
  failed += b - max_string
end
ans = []
ans.push(success, failed)
puts ans.join(" ")
0