結果

問題 No.481 1から10
コンテスト
ユーザー yu0912
提出日時 2020-07-23 17:27:10
言語 JavaScript
(node v25.8.2)
コンパイル:
true
実行:
node _filename_ ONLINE_JUDGE
結果
AC  
実行時間 36 ms / 2,000 ms
+ 702µs
コード長 420 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 47,972 KB
最終ジャッジ日時 2026-07-28 04:32:01
合計ジャッジ時間 1,394 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

function main(input = ``) {
  let lines = input.split('\n');

  let nums = lines[0].split(' ').map((val) => parseInt(val));

  return (
    55 -
    nums.reduce((sum, i) => {
      return sum + i;
    }, 0)
  );
}

const { readFileSync, existsSync } = require('fs');
const stdin = '/dev/stdin';

if (existsSync(stdin)) {
  const input = readFileSync(stdin, 'utf8');
  console.log(main(input));
}

module.exports = main;
0