All pastes #406691 Raw Edit

Anonymous

public python v1 · immutable
·published 2007-03-22 16:47 UTC
rendered paste body
#!/usr/bin/pythonfrom operator import mul, adddef fac(i): return 1 if i == 0 else reduce(mul, xrange(1, i + 1))def uniqueterms(i):	fac_chain = [i]	while len(set(fac_chain)) == len(fac_chain):		fac_chain.append(reduce(add, (fac(int(i)) for i in str(fac_chain[len(fac_chain) - 1]))))	return len(fac_chain)-1