結果

問題 No.516 赤と青の風船
ユーザー T AT A
提出日時 2021-06-13 16:32:27
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 404 bytes
コンパイル時間 7,461 ms
コンパイル使用メモリ 254,968 KB
実行使用メモリ 44,608 KB
最終ジャッジ日時 2023-08-24 19:29:33
合計ジャッジ時間 8,754 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
42,620 KB
testcase_01 AC 85 ms
42,724 KB
testcase_02 AC 87 ms
44,608 KB
testcase_03 AC 84 ms
42,604 KB
testcase_04 AC 85 ms
42,552 KB
testcase_05 AC 84 ms
42,732 KB
testcase_06 AC 86 ms
42,536 KB
testcase_07 AC 86 ms
42,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout
});
let lines = [];
reader.on("line", line => {
  lines.push(line);
});
reader.on("close", () => {
const sum = lines.map(line => line.trim().length).reduce( (accumulator, currentValue) => {
   return accumulator + currentValue
}) 
if (sum > 10 ) {
	console.log('BLUE')
} else {
console.log('RED')
}
});
0