結果

問題 No.279 木の数え上げ
ユーザー arito_asuarito_asu
提出日時 2020-06-21 10:21:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 10,732 KB
最終ジャッジ日時 2023-09-16 18:10:29
合計ジャッジ時間 3,454 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,836 KB
testcase_01 AC 15 ms
7,780 KB
testcase_02 AC 15 ms
7,840 KB
testcase_03 AC 15 ms
7,816 KB
testcase_04 AC 16 ms
7,764 KB
testcase_05 AC 15 ms
7,780 KB
testcase_06 AC 16 ms
7,760 KB
testcase_07 AC 16 ms
7,828 KB
testcase_08 AC 15 ms
7,836 KB
testcase_09 AC 15 ms
7,764 KB
testcase_10 AC 164 ms
9,672 KB
testcase_11 AC 48 ms
8,260 KB
testcase_12 AC 112 ms
9,140 KB
testcase_13 AC 33 ms
8,100 KB
testcase_14 AC 172 ms
10,732 KB
testcase_15 AC 144 ms
9,600 KB
testcase_16 AC 132 ms
9,452 KB
testcase_17 AC 163 ms
10,440 KB
testcase_18 AC 93 ms
8,928 KB
testcase_19 AC 162 ms
9,684 KB
testcase_20 AC 171 ms
9,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

inp = input()

for name in list('tre'): exec(f"{name} = 0")

for c in inp:
    if c == 't':
        t += 1
    elif c == 'r':
        r += 1
    elif c == 'e':
        e += 1
    
tree = 0
while t > 0 and r > 0 and e > 1:
    t -= 1
    r -= 1
    e -= 2
    tree += 1

print(tree)
0