結果

問題 No.888 約数の総和
ユーザー GrayCoderGrayCoder
提出日時 2019-09-20 22:36:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 76,300 KB
最終ジャッジ日時 2023-10-12 20:12:57
合計ジャッジ時間 4,721 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,696 KB
testcase_01 AC 75 ms
71,460 KB
testcase_02 AC 75 ms
71,824 KB
testcase_03 AC 77 ms
71,328 KB
testcase_04 AC 74 ms
71,600 KB
testcase_05 AC 73 ms
71,896 KB
testcase_06 AC 73 ms
71,828 KB
testcase_07 AC 73 ms
71,616 KB
testcase_08 AC 73 ms
71,752 KB
testcase_09 AC 73 ms
71,780 KB
testcase_10 AC 74 ms
71,880 KB
testcase_11 AC 72 ms
71,680 KB
testcase_12 AC 75 ms
71,612 KB
testcase_13 AC 78 ms
71,600 KB
testcase_14 AC 73 ms
71,620 KB
testcase_15 AC 74 ms
71,756 KB
testcase_16 AC 74 ms
71,464 KB
testcase_17 AC 74 ms
71,760 KB
testcase_18 AC 101 ms
75,772 KB
testcase_19 AC 96 ms
76,292 KB
testcase_20 AC 90 ms
75,960 KB
testcase_21 AC 104 ms
76,300 KB
testcase_22 AC 104 ms
75,748 KB
testcase_23 AC 77 ms
76,064 KB
testcase_24 AC 86 ms
75,868 KB
testcase_25 AC 88 ms
76,096 KB
testcase_26 AC 90 ms
75,748 KB
testcase_27 AC 94 ms
75,952 KB
testcase_28 AC 97 ms
75,888 KB
testcase_29 AC 98 ms
75,872 KB
testcase_30 AC 98 ms
75,984 KB
testcase_31 AC 99 ms
75,748 KB
testcase_32 AC 102 ms
75,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())

    n = int(N ** 0.5)
    a = set()
    for i in range(1, n + 1):
        div_, mod_ = divmod(N, i)
        if not mod_:
            a.add(i)
            a.add(div_)
    print(sum(a))

main()
0