結果

問題 No.888 約数の総和
ユーザー jp_stejp_ste
提出日時 2020-05-12 22:52:24
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 45,180 KB
最終ジャッジ日時 2024-04-21 03:32:15
合計ジャッジ時間 4,724 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
39,168 KB
testcase_01 AC 64 ms
39,040 KB
testcase_02 AC 65 ms
39,424 KB
testcase_03 WA -
testcase_04 AC 64 ms
39,168 KB
testcase_05 WA -
testcase_06 AC 69 ms
39,424 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 65 ms
39,296 KB
testcase_10 WA -
testcase_11 AC 68 ms
39,808 KB
testcase_12 AC 65 ms
39,040 KB
testcase_13 AC 65 ms
39,296 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 67 ms
39,040 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 158 ms
44,660 KB
testcase_20 WA -
testcase_21 AC 185 ms
44,800 KB
testcase_22 AC 185 ms
44,796 KB
testcase_23 WA -
testcase_24 AC 120 ms
44,668 KB
testcase_25 WA -
testcase_26 AC 134 ms
44,664 KB
testcase_27 AC 160 ms
44,672 KB
testcase_28 AC 162 ms
44,788 KB
testcase_29 WA -
testcase_30 AC 168 ms
44,796 KB
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

function main(input) {
  let N = BigInt(input.shift());
  let sum = 0n;
  for(let i=1n; i*i<=N; i++) {
    if(N % i == 0n) {
      sum += i;
      sum += N / i;
    }
  }
  console.log(sum.toString());
}

main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n"));
0