結果

問題 No.279 木の数え上げ
ユーザー _matumo_
提出日時 2018-07-28 23:59:21
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 576 bytes
コンパイル時間 871 ms
コンパイル使用メモリ 111,820 KB
実行使用メモリ 29,848 KB
最終ジャッジ日時 2024-07-06 14:24:53
合計ジャッジ時間 3,052 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace YukiCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var va = Console.ReadLine().Where(c => c == 't' || c == 'r' || c == 'e');
            var nt = va.Count(c => c == 't');
            var nr = va.Count(c => c == 'r');
            var ne = va.Count(c => c == 'e') / 2;
            var na = nt < nr ? nt : nr;
            var nb = na < ne ? na : ne;
            Console.WriteLine(nb);
            Console.ReadLine();
        }
    }
}
0