結果

問題 No.279 木の数え上げ
ユーザー TksiTksi
提出日時 2018-10-18 21:40:06
言語 JavaScript
(node v21.7.1)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 327 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 70,128 KB
最終ジャッジ日時 2024-04-21 02:15:21
合計ジャッジ時間 3,482 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
38,528 KB
testcase_01 AC 61 ms
38,400 KB
testcase_02 AC 59 ms
38,656 KB
testcase_03 AC 58 ms
39,552 KB
testcase_04 AC 55 ms
38,400 KB
testcase_05 AC 57 ms
38,400 KB
testcase_06 AC 57 ms
38,400 KB
testcase_07 AC 56 ms
38,400 KB
testcase_08 AC 59 ms
38,400 KB
testcase_09 AC 60 ms
38,400 KB
testcase_10 MLE -
testcase_11 AC 99 ms
45,220 KB
testcase_12 AC 172 ms
59,408 KB
testcase_13 AC 85 ms
43,796 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 AC 191 ms
62,312 KB
testcase_17 MLE -
testcase_18 AC 150 ms
55,384 KB
testcase_19 MLE -
testcase_20 MLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

let input = require('fs').readFileSync('/dev/stdin', 'utf8');
const COUNT = Array(3);
[...'tre'].forEach((v, i) => {
  COUNT[i] = [...input].filter(x => x == v).length;
});
let TMP = 0;
while (1) {
  COUNT[0]--;
  COUNT[1]--;
  COUNT[2] -= 2;
  if (!COUNT.every(v => v >= 0)) {
    console.log(TMP);
    return;
  }
  TMP++;
}
0