結果

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

ソースコード

diff #

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