結果
| 問題 |
No.516 赤と青の風船
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-18 08:37:36 |
| 言語 | JavaScript (node v23.5.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 500 bytes |
| コンパイル時間 | 39 ms |
| コンパイル使用メモリ | 6,692 KB |
| 実行使用メモリ | 42,428 KB |
| 最終ジャッジ日時 | 2024-10-13 01:35:28 |
| 合計ジャッジ時間 | 1,059 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 4 WA * 2 |
ソースコード
const reader = require("readline").createInterface({
input: process.stdin,
output: process.stdout
});
let lines = [];
reader.on("line", line => {
lines.push(line);
});
reader.on("close", () => {
const check1 = lines.filter(() => {
return lines[0] === lines[1]
})
const check2 = lines.filter(() => {
return lines[1] === lines[2]
})
if (check1 && check2) {
console.log(lines[0])
} else if (check1) {
console.log(lines[0])
} else {
console.log(lines[1])
}
});