結果

問題 No.279 木の数え上げ
ユーザー MaxMellon
提出日時 2015-09-25 00:52:13
言語 Ruby
(3.4.1)
結果
MLE  
実行時間 -
コード長 253 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 97,600 KB
最終ジャッジ日時 2024-07-19 09:06:25
合計ジャッジ時間 15,247 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 MLE * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

str = gets.chomp.split('')
ans = []
str.each { |e| ans.push e if e == 't' || e == 'r' || e == 'e' }.sort!
e = str.select { |item| item == 'e' }.size
t = str.select { |item| item == 't' }.size
r = str.select { |item| item == 'r' }.size
p [e/2, t, r].min
0