結果

問題 No.369 足し間違い
ユーザー megane_anko
提出日時 2021-02-28 01:56:06
言語 TypeScript
(5.7.2)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 7,736 ms
コンパイル使用メモリ 228,688 KB
実行使用メモリ 39,552 KB
最終ジャッジ日時 2024-12-31 16:30:25
合計ジャッジ時間 8,765 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');

const nlarray = input.split('\n');
const N = parseInt(nlarray[0]);
const v = parseInt(nlarray[2]);

const Aarray = nlarray[1].split(' ');
let sum = 0;
let result = null;

for (let i = 0; i < Aarray.length; i++) {
    sum = sum + parseInt(Aarray[i]);
}

result = sum - v;

console.log(result);
0