結果

問題 No.516 赤と青の風船
ユーザー T AT A
提出日時 2021-06-11 06:49:42
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 475 bytes
コンパイル時間 10,221 ms
コンパイル使用メモリ 253,984 KB
実行使用メモリ 44,672 KB
最終ジャッジ日時 2023-08-20 18:12:37
合計ジャッジ時間 9,837 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
44,648 KB
testcase_01 AC 69 ms
42,640 KB
testcase_02 AC 76 ms
42,796 KB
testcase_03 AC 69 ms
42,672 KB
testcase_04 AC 67 ms
42,680 KB
testcase_05 AC 70 ms
44,672 KB
testcase_06 AC 68 ms
42,796 KB
testcase_07 AC 69 ms
42,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

export { }
const lines = [];
const reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
})

reader.on('line', (line) => {
  lines.push(line)
})
reader.on('close', () => {

  const colorList: string[] = lines

  const redList: string[] = colorList.filter((color: string): boolean => {
    return (color === 'red' || color === 'RED' )
  })

  if (redList.length >= 2) {
    console.log('RED')
  } else {
    console.log('BLUE')
  }
})
0