結果

問題 No.278 連続する整数の和(2)
ユーザー tjaketjake
提出日時 2015-12-18 03:58:46
言語 Python2
(2.7.18)
結果
AC  
実行時間 432 ms / 2,000 ms
コード長 114 bytes
コンパイル時間 578 ms
コンパイル使用メモリ 6,636 KB
実行使用メモリ 6,196 KB
最終ジャッジ日時 2023-08-24 22:46:37
合計ジャッジ時間 2,616 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,920 KB
testcase_01 AC 11 ms
6,196 KB
testcase_02 AC 432 ms
6,180 KB
testcase_03 AC 11 ms
6,176 KB
testcase_04 AC 11 ms
6,024 KB
testcase_05 AC 12 ms
6,008 KB
testcase_06 AC 11 ms
6,044 KB
testcase_07 AC 11 ms
6,172 KB
testcase_08 AC 11 ms
5,944 KB
testcase_09 AC 11 ms
5,988 KB
testcase_10 AC 16 ms
5,992 KB
testcase_11 AC 57 ms
6,028 KB
testcase_12 AC 11 ms
6,004 KB
testcase_13 AC 292 ms
5,932 KB
testcase_14 AC 40 ms
6,176 KB
testcase_15 AC 172 ms
5,992 KB
testcase_16 AC 50 ms
6,100 KB
testcase_17 AC 39 ms
5,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=input()
p=n%2*n or n/2
i=2
q=1
while i*i<=p:
 c=1
 while p%i<1:c+=1;p/=i
 q*=(i**c-1)/~-i;i+=1
print(p+(p>1))*q
0