結果

問題 No.279 木の数え上げ
ユーザー mokraimokrai
提出日時 2017-10-22 00:12:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,272 KB
最終ジャッジ日時 2024-05-01 09:22:52
合計ジャッジ時間 2,764 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,752 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 32 ms
10,624 KB
testcase_03 AC 33 ms
10,624 KB
testcase_04 AC 31 ms
10,624 KB
testcase_05 AC 31 ms
10,624 KB
testcase_06 AC 32 ms
10,624 KB
testcase_07 AC 31 ms
10,624 KB
testcase_08 AC 31 ms
10,752 KB
testcase_09 AC 33 ms
10,624 KB
testcase_10 AC 100 ms
19,620 KB
testcase_11 AC 46 ms
12,380 KB
testcase_12 AC 78 ms
16,720 KB
testcase_13 AC 40 ms
11,648 KB
testcase_14 AC 105 ms
20,272 KB
testcase_15 AC 92 ms
17,976 KB
testcase_16 AC 89 ms
17,260 KB
testcase_17 AC 100 ms
19,592 KB
testcase_18 AC 69 ms
14,952 KB
testcase_19 AC 99 ms
18,828 KB
testcase_20 AC 105 ms
19,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    input_string = input()
    d = {"t":0, "r":0, "e":0}
    for e in list(input_string):
        if e == "t":
            d["t"] += 1
        elif e == "r":
            d["r"] += 1
        elif e == "e":
            d["e"] += 1

    l = []
    l.append(d["t"])
    l.append(d["r"])
    l.append(int(d["e"]/2))
    print(min(l))

if __name__ == '__main__':
    main()
0