結果
問題 |
No.278 連続する整数の和(2)
|
ユーザー |
|
提出日時 | 2015-09-04 23:18:25 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 299 bytes |
コンパイル時間 | 101 ms |
コンパイル使用メモリ | 6,812 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-19 02:01:25 |
合計ジャッジ時間 | 1,197 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 1 RE * 13 |
ソースコード
N = int(raw_input()) if N <= 2: print 1 exit() elif N == 3: print 4 exit() n = N i = 2 ans = 1 while i*i <= n: p = 0 while n % i == 0: n /= i p += 1 if p > 0: ans *= (pow(i, p + 1) - 1) / (p - 1) i += 1 if n > 1: ans *= 1 + n print ans