a=int(input())
i=1
num=[]
b = a
for i in range(2,a+1):
j = 0
while b % i == 0:
j += 1
b /= i
if b == 1:
break
if j != 0:
if j == 1:
k = str(i)
else:
k = str(i)+'^'+str(j)
num.append(k)
print(' * '.join(num))
一直是NA(94%),有一個測資會超過三秒,其他都對,想請教大神是哪裡會出問題?