結果
問題 |
No.278 連続する整数の和(2)
|
ユーザー |
|
提出日時 | 2016-11-08 20:05:42 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 339 bytes |
コンパイル時間 | 119 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 47,180 KB |
最終ジャッジ日時 | 2024-11-25 05:19:02 |
合計ジャッジ時間 | 2,112 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 2 |
ソースコード
from math import * N = input() if N == 1: print 1 elif N == 2: print 1 else: v = N if N%2 else N/2 ans = 0 sn = int(sqrt(v)) for i in range(1,sn+1): if v % i == 0: if i == sn: ans += i else: ans += i ans += v/i print ans