Factorize me by nn

unsigned v,p,n;main(){for(;~scanf("%u",&v);)for(printf("%u=",v,p=2);v%p<1?v/=p,++n:(n=n&&!printf("%u^%u%3$c"+1/n*3,p,n,v-1?42:10),p=p<5e4?p+1:v)-1;);}

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

download

return to the top page