結果

問題 No.278 連続する整数の和(2)
ユーザー titiatitia
提出日時 2022-09-21 00:11:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 248 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-06-01 17:08:43
合計ジャッジ時間 3,234 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,880 KB
testcase_01 AC 31 ms
10,880 KB
testcase_02 AC 221 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 31 ms
10,880 KB
testcase_05 AC 33 ms
10,752 KB
testcase_06 AC 36 ms
10,752 KB
testcase_07 AC 36 ms
10,880 KB
testcase_08 AC 197 ms
11,008 KB
testcase_09 AC 198 ms
10,880 KB
testcase_10 AC 248 ms
10,880 KB
testcase_11 AC 195 ms
10,752 KB
testcase_12 AC 31 ms
10,752 KB
testcase_13 AC 168 ms
10,752 KB
testcase_14 AC 140 ms
10,880 KB
testcase_15 AC 151 ms
10,752 KB
testcase_16 AC 123 ms
10,880 KB
testcase_17 AC 215 ms
10,752 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