Factorize me by hallvabo

while~0:
 n=input();s="%u="%n
 for p in[2]+range(3,41594,2):
\x09c=0
\x09while n%p<1:c+=1;n/=p
\x09if c:s+="%u"%p+"^%u"%c*(c>1)+"*"
 print(s[:-1],s+str(n))[n>1]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page