結果
| 問題 | No.278 連続する整数の和(2) |
| コンテスト | |
| ユーザー |
しらっ亭
|
| 提出日時 | 2015-09-05 21:48:41 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 412 bytes |
| 記録 | |
| コンパイル時間 | 396 ms |
| コンパイル使用メモリ | 20,832 KB |
| 実行使用メモリ | 2,616,968 KB |
| 最終ジャッジ日時 | 2026-04-02 14:05:49 |
| 合計ジャッジ時間 | 2,239 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 RE * 1 MLE * 2 -- * 11 |
ソースコード
def divisors(n):
s = [False] * (n + 1)
s[1] = s[n] = True
for x in range(2, int(n ** 0.5) + 1):
if n % x == 0:
s[x] = True
y = n // x
if y != x:
s[y] = True
return [i for i in range(n + 1) if s[i]]
def solve():
N = int(input())
g = N if N % 2 else N // 2
print(sum(divisors(g)))
if __name__ == '__main__':
solve()
しらっ亭