結果

問題 No.975 ミスターマックスバリュ
ユーザー baan_nasebanarubaan_nasebanaru
提出日時 2020-03-11 01:21:26
言語 JavaScript
(node v21.7.1)
結果
RE  
実行時間 -
コード長 814 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 40,320 KB
最終ジャッジ日時 2024-04-21 03:12:04
合計ジャッジ時間 1,380 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

let lines = [];
reader.on("line", line => { lines.push(line);
});
reader.on("close", () => {
  let wishProduct = lines[0].split(" ").map((value) => {
    return value * 1;
  });
  let mrMax = lines[1].split(" ").map((value) => {
    return value * 1;
  });
  let maxValue = lines[2].split(" ").map((value) => {
    return value * 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')
  }
});
0