結果
| 問題 | 
                            No.279 木の数え上げ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-01-24 17:13:50 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                MLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,217 bytes | 
| コンパイル時間 | 898 ms | 
| コンパイル使用メモリ | 103,680 KB | 
| 実行使用メモリ | 75,216 KB | 
| 最終ジャッジ日時 | 2024-12-23 08:00:30 | 
| 合計ジャッジ時間 | 35,245 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 8 TLE * 10 MLE * 3 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
using System.Collections.Generic;
class Program
{
    static void Main(string[] args)
    {
        string s = Console.ReadLine();
        List<string> lst = new List<string>();
        int cnt = 0;
        bool b = true;
        for (int i = 0; i < s.Length; i++)
        {
            lst.Add(s[i].ToString());
        }
        while (true)
        {
            if (lst.Contains("t"))
            {
                lst.Remove("t");
            }
            else
            {
                b = false;
            }
            if (lst.Contains("r"))
            {
                lst.Remove("r");
            }
            else
            {
                b = false;
            }
            for (int i = 0; i < 2; i++)
            {
                if (lst.Contains("e"))
                {
                    lst.Remove("e");
                }
                else
                {
                    b = false;
                }
            }
            if (b == true)
            {
                cnt++;
            }
            else
            {
                break;
            }
        }
        Console.WriteLine(cnt);
        Console.Read();
    }
}