結果

問題 No.279 木の数え上げ
ユーザー k.hk.h
提出日時 2019-08-04 23:33:35
言語 Go
(1.22.1)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 379 bytes
コンパイル時間 12,865 ms
コンパイル使用メモリ 207,116 KB
実行使用メモリ 5,524 KB
最終ジャッジ日時 2023-09-24 22:34:55
合計ジャッジ時間 14,449 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,356 KB
testcase_01 AC 1 ms
4,356 KB
testcase_02 AC 1 ms
4,356 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 1 ms
4,356 KB
testcase_06 AC 1 ms
4,356 KB
testcase_07 AC 1 ms
4,352 KB
testcase_08 AC 2 ms
4,352 KB
testcase_09 AC 1 ms
4,352 KB
testcase_10 AC 2 ms
5,520 KB
testcase_11 AC 2 ms
4,352 KB
testcase_12 AC 2 ms
5,520 KB
testcase_13 AC 1 ms
4,352 KB
testcase_14 AC 2 ms
5,520 KB
testcase_15 AC 3 ms
5,516 KB
testcase_16 AC 2 ms
5,520 KB
testcase_17 AC 3 ms
5,520 KB
testcase_18 AC 2 ms
4,360 KB
testcase_19 AC 2 ms
5,524 KB
testcase_20 AC 2 ms
5,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	rdr := bufio.NewReaderSize(os.Stdin, 1000001)
	l, _, _ := rdr.ReadLine()
	str := string(l)
	var min = 1000001
	t := strings.Count(str, "t")
	r := strings.Count(str, "r")
	e := strings.Count(str, "e") / 2
	if min > t {
		min = t
	}
	if min > r {
		min = r
	}
	if min > e {
		min = e
	}
	fmt.Println(min)
}
0