結果

問題 No.278 連続する整数の和(2)
ユーザー fiord
提出日時 2017-08-24 14:51:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 75,648 KB
最終ジャッジ日時 2024-10-15 14:18:44
合計ジャッジ時間 1,839 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = n if n % 2 == 1 else int(n / 2)
ret = i = 1
while i * i <= m:
    i += 1
    cnt = 1
    while m % i == 0:
        m /= i
        cnt += 1
    ret *= (i**ret - 1) / (i - 1)
ret *= m + 1 if m > 1 else 1
print(int(ret))
0