結果
| 問題 |
No.975 ミスターマックスバリュ
|
| ユーザー |
baan_nasebanaru
|
| 提出日時 | 2020-03-11 01:24:18 |
| 言語 | JavaScript (node v23.5.0) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 2,000 ms |
| コード長 | 922 bytes |
| コンパイル時間 | 43 ms |
| コンパイル使用メモリ | 6,820 KB |
| 実行使用メモリ | 49,720 KB |
| 最終ジャッジ日時 | 2024-10-13 01:33:23 |
| 合計ジャッジ時間 | 1,551 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
const reader = require("readline").createInterface({
input: process.stdin, output: process.stdout
});
let lines = [];
reader.on("line", line => { lines.push(line);
});
reader.on("close", () => {
let wishProduct = lines[0].split(" ").map((avalue) => {
return avalue * 1;
});
let mrMax = lines[1].split(" ").map((value) => {
return value * 1;
});
let maxValue = lines[2].split(" ").map((cvalue) => {
return cvalue * 1;
});
let mrMaxResult = mrMax.some((mrMaxProductId) =>{
return mrMaxProductId === wishProduct[0]
});
let maxValueResult = maxValue.some((maxValueProductId) =>{
return maxValueProductId === wishProduct[0]
});
if ( mrMaxResult === true && maxValueResult === true) {
console.log('MrMaxValu')
} else if (mrMaxResult === true ){
console.log('MrMax')
} else if (maxValueResult === true ){
console.log('MaxValu')
} else {
console.log('-1')
}
});
baan_nasebanaru