結果

問題 No.279 木の数え上げ
ユーザー fmhrfmhr
提出日時 2015-09-18 22:28:21
言語 Go
(1.21.3)
結果
AC  
実行時間 964 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 12,551 ms
コンパイル使用メモリ 211,772 KB
実行使用メモリ 7,812 KB
最終ジャッジ日時 2023-08-04 17:59:02
合計ジャッジ時間 21,113 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,508 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 3 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 896 ms
7,792 KB
testcase_11 AC 192 ms
5,604 KB
testcase_12 AC 612 ms
7,700 KB
testcase_13 AC 110 ms
4,380 KB
testcase_14 AC 964 ms
7,812 KB
testcase_15 AC 807 ms
7,792 KB
testcase_16 AC 722 ms
7,792 KB
testcase_17 AC 907 ms
7,788 KB
testcase_18 AC 459 ms
7,688 KB
testcase_19 AC 868 ms
7,796 KB
testcase_20 AC 942 ms
7,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
)

func main() {
	solve279()
}

func solve279(){
	var S string
	fmt.Scan(&S)
	var t, r, e int
	for i:=0; i<len(S); i++ {
	    if string(S[i])=="t"{
			t++
		}else if string(S[i])=="r"{
			r++
		}else if string(S[i])=="e"{
			e++
		}
	}
	fmt.Println(min(min(t, r), e/2))
}

func min(a, b int) int {
	if a < b {
		a, b = b, a
	}
	return b
}
0