結果

問題 No.279 木の数え上げ
ユーザー mesh1nek0x0mesh1nek0x0
提出日時 2018-07-05 19:23:30
言語 Ruby
(3.3.0)
結果
MLE  
実行時間 -
コード長 243 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 11,512 KB
実行使用メモリ 80,588 KB
最終ジャッジ日時 2023-09-13 18:01:33
合計ジャッジ時間 7,732 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,236 KB
testcase_01 AC 79 ms
15,356 KB
testcase_02 AC 80 ms
15,160 KB
testcase_03 AC 78 ms
15,244 KB
testcase_04 AC 77 ms
15,332 KB
testcase_05 AC 81 ms
15,116 KB
testcase_06 AC 78 ms
15,140 KB
testcase_07 AC 78 ms
15,152 KB
testcase_08 AC 79 ms
15,280 KB
testcase_09 AC 77 ms
15,264 KB
testcase_10 MLE -
testcase_11 AC 201 ms
28,396 KB
testcase_12 MLE -
testcase_13 AC 152 ms
22,732 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 AC 393 ms
54,336 KB
testcase_19 MLE -
testcase_20 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/bin/ruby
S = gets.chomp.split('')
counter = {
  't' => 0,
  'r' => 0,
  'e' => 0,
}

S.count.times do | num |
  if ['t', 'r', 'e'].include?(S[num])
    counter[S[num]] += 1
  end
end

puts [counter['t'], counter['r'], counter['e'] / 2].min
0