結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
38,656 KB
testcase_01 AC 56 ms
38,528 KB
testcase_02 AC 59 ms
38,528 KB
testcase_03 AC 59 ms
38,528 KB
testcase_04 AC 60 ms
38,528 KB
testcase_05 AC 57 ms
38,528 KB
testcase_06 AC 60 ms
38,528 KB
testcase_07 AC 58 ms
38,528 KB
testcase_08 AC 57 ms
38,400 KB
testcase_09 AC 59 ms
38,400 KB
testcase_10 AC 146 ms
43,156 KB
testcase_11 AC 83 ms
42,316 KB
testcase_12 AC 109 ms
42,864 KB
testcase_13 AC 69 ms
42,496 KB
testcase_14 AC 144 ms
43,484 KB
testcase_15 AC 130 ms
43,176 KB
testcase_16 AC 126 ms
43,100 KB
testcase_17 AC 136 ms
43,412 KB
testcase_18 AC 106 ms
42,584 KB
testcase_19 AC 133 ms
43,260 KB
testcase_20 AC 151 ms
43,456 KB
権限があれば一括ダウンロードができます

ソースコード

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", Math.floor(res));
}

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