結果

問題 No.278 連続する整数の和(2)
ユーザー pluto77pluto77
提出日時 2016-09-18 16:22:51
言語 Python2
(2.7.18)
結果
AC  
実行時間 216 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 6,704 KB
実行使用メモリ 6,180 KB
最終ジャッジ日時 2023-08-24 22:48:09
合計ジャッジ時間 2,544 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,876 KB
testcase_01 AC 12 ms
5,984 KB
testcase_02 AC 188 ms
5,940 KB
testcase_03 AC 11 ms
5,944 KB
testcase_04 AC 11 ms
6,168 KB
testcase_05 AC 14 ms
6,180 KB
testcase_06 AC 16 ms
6,144 KB
testcase_07 AC 15 ms
5,944 KB
testcase_08 AC 170 ms
5,944 KB
testcase_09 AC 170 ms
6,024 KB
testcase_10 AC 216 ms
6,116 KB
testcase_11 AC 165 ms
6,112 KB
testcase_12 AC 11 ms
5,916 KB
testcase_13 AC 142 ms
6,120 KB
testcase_14 AC 113 ms
6,048 KB
testcase_15 AC 123 ms
5,952 KB
testcase_16 AC 100 ms
5,988 KB
testcase_17 AC 175 ms
5,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_278
import math

n=int(raw_input())
if n%2==0:
 n/=2
res=0
for i in xrange(1,int(math.sqrt(n))+1):
 if n==i*i:
  res+=i
 elif n%i==0:
   res+=n/i+i
print res
0