結果

問題 No.480 合計
ユーザー eat_tamagoeat_tamago
提出日時 2019-10-27 13:52:00
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 378 bytes
コンパイル時間 27 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 42,356 KB
最終ジャッジ日時 2024-10-13 01:26:31
合計ジャッジ時間 2,391 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
    
  let sum = 0; //合計
let n = lines[0];
for (i = 0; i <= n; i++) {
    sum += i;
}

console.log(sum); //15
});
0