結果

問題 No.279 木の数え上げ
ユーザー togatogatogatoga
提出日時 2016-04-25 19:21:58
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 34 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 43,992 KB
最終ジャッジ日時 2024-04-21 01:18:37
合計ジャッジ時間 2,970 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
39,296 KB
testcase_01 AC 64 ms
38,912 KB
testcase_02 WA -
testcase_03 AC 63 ms
39,168 KB
testcase_04 WA -
testcase_05 AC 62 ms
39,040 KB
testcase_06 AC 62 ms
39,168 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 144 ms
43,924 KB
testcase_11 AC 86 ms
42,952 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 150 ms
43,920 KB
testcase_18 AC 110 ms
43,224 KB
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
	input = input.split("\n");
	var s = input[0];
	var deg = new Object();
	var alphabet = "abcdefghijklmnopqrstuvwxyz";
	for (var i = 0; i < alphabet.length; i++){
		// console.log("%s", alphabet[i]);
		deg[alphabet[i]] = 0;

	}
	for (var i = 0; i < s.length; i++){
		deg[s[i]]  += 1;
	}
	var res = Math.min(deg["t"], deg["r"]);
	res = Math.min(res, deg["e"] / 2);
	console.log("%d", res);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0