結果

問題 No.278 連続する整数の和(2)
ユーザー rlangevinrlangevin
提出日時 2023-06-21 12:22:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 75,860 KB
最終ジャッジ日時 2023-09-11 07:45:32
合計ジャッジ時間 3,405 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,308 KB
testcase_01 AC 74 ms
71,516 KB
testcase_02 AC 95 ms
75,296 KB
testcase_03 AC 72 ms
71,232 KB
testcase_04 AC 76 ms
71,384 KB
testcase_05 AC 77 ms
75,464 KB
testcase_06 AC 77 ms
75,220 KB
testcase_07 AC 78 ms
75,860 KB
testcase_08 AC 93 ms
75,436 KB
testcase_09 AC 95 ms
75,292 KB
testcase_10 AC 101 ms
75,376 KB
testcase_11 AC 95 ms
75,440 KB
testcase_12 AC 78 ms
71,464 KB
testcase_13 AC 94 ms
75,288 KB
testcase_14 AC 90 ms
75,328 KB
testcase_15 AC 90 ms
75,376 KB
testcase_16 AC 88 ms
75,552 KB
testcase_17 AC 96 ms
75,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def div(n):
    i = 1
    SS = set()
    while i * i <= n:
        if n % i == 0:
            SS.add(i)
            SS.add(n//i)
        i += 1
    return SS

N = int(input())
if N % 2 == 0:
    N //= 2

print(sum(div(N)))
0