結果

問題 No.279 木の数え上げ
ユーザー fV9TwBhUoa9S3eVfV9TwBhUoa9S3eV
提出日時 2019-09-18 10:55:30
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 503 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 14,148 KB
最終ジャッジ日時 2023-09-22 04:42:26
合計ジャッジ時間 4,712 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,308 KB
testcase_01 AC 15 ms
7,924 KB
testcase_02 AC 15 ms
7,788 KB
testcase_03 AC 14 ms
7,836 KB
testcase_04 AC 15 ms
7,780 KB
testcase_05 AC 15 ms
7,796 KB
testcase_06 AC 15 ms
7,788 KB
testcase_07 AC 15 ms
7,852 KB
testcase_08 AC 15 ms
7,924 KB
testcase_09 AC 15 ms
7,920 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# No.279 木の数え上げ
s = input()
trees = 0

while True:
    if 't' in s:
        s = s.replace('t', '', 1)
        if 'r' in s:
            s = s.replace('r', '', 1)
            if 'e' in s:
                s = s.replace('e', '', 1)
                if 'e' in s:
                    s = s.replace('e', '', 1)
                    trees += 1
                else:
                    break
            else:
                break
        else:
            break
    else:
        break

print(trees)
0