結果

問題 No.987 N×Mマス計算(基本)
ユーザー mnao305
提出日時 2020-02-14 21:57:19
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 56 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 50,912 KB
最終ジャッジ日時 2024-10-13 01:30:04
合計ジャッジ時間 3,384 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

"use strict"

const main = (INPUT) => {
  const input = INPUT.split("\n")
  const N = input[0].split(' ')[0]
  const M = input[0].split(' ')[1]
  input.shift()
  const b = input[0].split(" ")
  const op = b.shift()
  input.shift()
  for (let i = 0; i < N; i++) {
    let ans = ""
    for (let j = 0; j < M; j++) {
      ans += ` ${eval(`${input[i]}${op}${b[j]}`)}`
    }
    console.log(ans.trim())
  }
}

main(require("fs").readFileSync("/dev/stdin", "utf8"))
0