結果
問題 |
No.278 連続する整数の和(2)
|
ユーザー |
![]() |
提出日時 | 2015-09-05 21:48:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 72 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 821,376 KB |
最終ジャッジ日時 | 2024-07-19 04:14:54 |
合計ジャッジ時間 | 1,986 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 RE * 1 MLE * 1 -- * 12 |
ソースコード
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()