結果

問題 No.888 約数の総和
ユーザー 👑 tamatotamato
提出日時 2020-03-10 00:14:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 1,380 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 75,780 KB
最終ジャッジ日時 2023-08-09 21:41:12
合計ジャッジ時間 6,721 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,116 KB
testcase_01 AC 72 ms
71,264 KB
testcase_02 AC 71 ms
71,300 KB
testcase_03 AC 71 ms
71,228 KB
testcase_04 AC 72 ms
71,256 KB
testcase_05 AC 73 ms
71,508 KB
testcase_06 AC 72 ms
71,316 KB
testcase_07 AC 70 ms
71,260 KB
testcase_08 AC 69 ms
71,152 KB
testcase_09 AC 71 ms
71,548 KB
testcase_10 AC 70 ms
71,312 KB
testcase_11 AC 71 ms
71,308 KB
testcase_12 AC 72 ms
71,556 KB
testcase_13 AC 74 ms
71,516 KB
testcase_14 AC 73 ms
71,044 KB
testcase_15 AC 72 ms
71,500 KB
testcase_16 AC 72 ms
71,492 KB
testcase_17 AC 72 ms
71,388 KB
testcase_18 AC 90 ms
75,168 KB
testcase_19 AC 84 ms
75,116 KB
testcase_20 AC 82 ms
75,476 KB
testcase_21 AC 91 ms
75,780 KB
testcase_22 AC 89 ms
75,336 KB
testcase_23 AC 74 ms
75,292 KB
testcase_24 AC 78 ms
75,472 KB
testcase_25 AC 83 ms
75,396 KB
testcase_26 AC 83 ms
75,284 KB
testcase_27 AC 85 ms
75,580 KB
testcase_28 AC 86 ms
75,168 KB
testcase_29 AC 83 ms
75,580 KB
testcase_30 AC 85 ms
75,292 KB
testcase_31 AC 84 ms
75,320 KB
testcase_32 AC 90 ms
75,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    import sys
    from math import sqrt
    input = sys.stdin.readline

    N = int(input())
    div = []
    for i in range(1, int(sqrt(N))+1):
        if N%i == 0:
            div.append(i)
            div.append(N//i)
    if div[-1] ** 2 == N:
        div.pop()
    print(sum(div))


if __name__ == '__main__':
    main()
0