結果
| 問題 | No.888 約数の総和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-25 03:10:17 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 452 bytes |
| 記録 | |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 21,084 KB |
| 実行使用メモリ | 15,788 KB |
| 最終ジャッジ日時 | 2026-09-01 19:14:19 |
| 合計ジャッジ時間 | 5,604 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 30 |
ソースコード
def factorization(n):
arr = [1]
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while temp%i==0:
cnt+=1
temp //= i
arr.append(i)
if temp!=1:
arr.append(temp)
if arr==[]:
arr.append(n)
if not n in arr:
arr.append(n)
return arr
n = int(input())
factor = factorization(n)
print(factor)
print(sum(factor))