結果

問題 No.888 約数の総和
ユーザー Takuya-AmpiTakuya-Ampi
提出日時 2020-03-31 04:35:39
言語 JavaScript
(node v21.7.1)
結果
TLE  
実行時間 -
コード長 462 bytes
コンパイル時間 31 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 53,216 KB
最終ジャッジ日時 2024-04-21 03:19:17
合計ジャッジ時間 5,725 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
49,108 KB
testcase_01 AC 90 ms
40,448 KB
testcase_02 AC 93 ms
43,776 KB
testcase_03 AC 95 ms
40,064 KB
testcase_04 AC 90 ms
40,064 KB
testcase_05 AC 88 ms
40,192 KB
testcase_06 AC 91 ms
40,192 KB
testcase_07 AC 89 ms
40,448 KB
testcase_08 AC 99 ms
45,748 KB
testcase_09 AC 95 ms
44,416 KB
testcase_10 AC 96 ms
43,776 KB
testcase_11 AC 97 ms
44,544 KB
testcase_12 AC 98 ms
45,880 KB
testcase_13 AC 100 ms
46,128 KB
testcase_14 AC 98 ms
45,892 KB
testcase_15 AC 97 ms
43,904 KB
testcase_16 AC 105 ms
46,012 KB
testcase_17 AC 104 ms
45,888 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

const reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout
});
let lines = [];
reader.on("line", line => {
  lines.push(line);
});
reader.on("close", () => {
  const number = parseInt(lines[0])
  const results = []
  const divisor = (num) => {
    for (let i = 1; i <= num; i++) {
      if (num % i === 0) {
        results.push(i)
      }
    }
  }
  divisor(number)
  console.log(results.reduce((a, c) => a + c))
});
0