結果

問題 No.279 木の数え上げ
ユーザー
提出日時 2015-12-24 16:36:04
言語 Python2
(2.7.18)
結果
AC  
実行時間 316 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 38,912 KB
最終ジャッジ日時 2024-04-22 16:14:28
合計ジャッジ時間 3,540 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,272 KB
testcase_01 AC 11 ms
6,272 KB
testcase_02 AC 12 ms
6,144 KB
testcase_03 AC 11 ms
6,144 KB
testcase_04 AC 10 ms
6,272 KB
testcase_05 AC 11 ms
6,272 KB
testcase_06 AC 10 ms
6,144 KB
testcase_07 AC 11 ms
6,144 KB
testcase_08 AC 11 ms
6,272 KB
testcase_09 AC 11 ms
6,272 KB
testcase_10 AC 293 ms
36,608 KB
testcase_11 AC 72 ms
12,928 KB
testcase_12 AC 203 ms
26,752 KB
testcase_13 AC 45 ms
9,856 KB
testcase_14 AC 316 ms
38,912 KB
testcase_15 AC 261 ms
33,152 KB
testcase_16 AC 239 ms
30,720 KB
testcase_17 AC 300 ms
36,736 KB
testcase_18 AC 159 ms
21,760 KB
testcase_19 AC 287 ms
35,968 KB
testcase_20 AC 309 ms
38,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

aaa = raw_input()
ans = 0
a = 0
b = 0
c = 0
d = 0
for i in range(0, len(aaa)):
  if aaa[i] == "t":
    a = a + 1
  if aaa[i] == "r":
    b = b + 1
  if aaa[i] == "e":
    c = c + 1

while(1):
  a = a - 1
  b = b - 1
  c = c - 2
  if a >= 0 and b >= 0 and c >=0:
    ans = ans + 1
  else:
    break

print ans
0