結果
| 問題 | No.278 連続する整数の和(2) |
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2017-08-24 14:47:10 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 175 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-05-04 17:59:13 |
| 合計ジャッジ時間 | 2,978 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 15 |
ソースコード
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))
fiord