結果

問題 No.278 連続する整数の和(2)
ユーザー titiatitia
提出日時 2022-09-21 00:11:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 8,228 KB
最終ジャッジ日時 2023-08-23 19:44:42
合計ジャッジ時間 3,124 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,148 KB
testcase_01 AC 17 ms
8,144 KB
testcase_02 AC 168 ms
8,224 KB
testcase_03 AC 16 ms
8,056 KB
testcase_04 AC 17 ms
8,056 KB
testcase_05 AC 20 ms
8,228 KB
testcase_06 AC 20 ms
8,192 KB
testcase_07 AC 21 ms
8,076 KB
testcase_08 AC 158 ms
8,056 KB
testcase_09 AC 157 ms
8,196 KB
testcase_10 AC 199 ms
8,212 KB
testcase_11 AC 153 ms
8,068 KB
testcase_12 AC 16 ms
7,988 KB
testcase_13 AC 131 ms
8,072 KB
testcase_14 AC 104 ms
8,056 KB
testcase_15 AC 115 ms
8,148 KB
testcase_16 AC 92 ms
8,144 KB
testcase_17 AC 159 ms
8,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
if N%2==0:
    x=N//2
else:
    x=N

# xの約数の列挙
import math
xr=math.ceil(math.sqrt(x))

LIST=[]
for i in range(1,xr+1):
    if x%i==0:
        LIST.append(i)
        LIST.append(x//i)
ANS=0

for s in set(LIST):
    ANS+=s

print(ANS)
0