import math
N = int(input())
p=[]
if N == 1 :
print("error")
while N !=1:
if len(p)==0:
start=2
else:
start=p[-1]
for i in range(start,N+1):
if N % i==0:
#print(i)
p.append(i)
N=N//i
break
else:
continue
소인수 분해는 할 줄 알겠는데
[입력예시]
135
[출력예시]
3 ^ 3 X 5 ^ 1
이런식으로 출력할 줄 모르겠습니다.
도와주십시오