結果

問題 No.279 木の数え上げ
ユーザー kazukikazuki
提出日時 2019-02-04 14:05:20
言語 Ruby
(3.3.0)
結果
AC  
実行時間 799 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 11,564 KB
実行使用メモリ 16,760 KB
最終ジャッジ日時 2023-08-26 09:27:11
合計ジャッジ時間 9,086 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,164 KB
testcase_01 AC 83 ms
15,400 KB
testcase_02 AC 84 ms
15,180 KB
testcase_03 AC 83 ms
15,428 KB
testcase_04 AC 81 ms
15,164 KB
testcase_05 AC 82 ms
15,080 KB
testcase_06 AC 83 ms
15,104 KB
testcase_07 AC 80 ms
15,300 KB
testcase_08 AC 83 ms
15,276 KB
testcase_09 AC 82 ms
15,076 KB
testcase_10 AC 751 ms
16,488 KB
testcase_11 AC 225 ms
15,912 KB
testcase_12 AC 526 ms
16,404 KB
testcase_13 AC 163 ms
15,840 KB
testcase_14 AC 799 ms
16,760 KB
testcase_15 AC 674 ms
16,568 KB
testcase_16 AC 627 ms
16,372 KB
testcase_17 AC 752 ms
16,692 KB
testcase_18 AC 424 ms
15,992 KB
testcase_19 AC 734 ms
16,452 KB
testcase_20 AC 774 ms
16,724 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

table = Hash.new(0)

gets.scan(/./){|m| table[m] += 1}

count = 0

while table['t'] >= 1 && table['r'] >= 1 && table['e'] >= 2
  table['t'] -= 1
  table['r'] -= 1
  table['e'] -= 2
  count += 1
end

puts count
0