Semiprime factorization is as easy as 123 by orthoplex

def f(a,b,d):
 D=10*d;a>1>n%a==print(a,"*",n//a)
 for i in range(9):A=a+i%3*d+d;B=b-~i//3*d;A*B%D==n%D==f(A,B,D)
while 1:n=int(input());f(0,0,1)

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page