def main(): MAXP = 100000 primes = SIEVE.sieve(MAXP, MAXP) for line in sys.stdin: n = int(line.rstrip()) assert n <= MAXP*MAXP #print(divisors(n, primes), sum_divisors(n, primes), prime_parity(n, primes), euler_phi(n, primes), moebius(n, primes)) print(divisors(n, primes)) sys.stdout.flush()
def main(): MAXP = 100000 prime = SIEVE.sieve(MAXP, MAXP) for line in sys.stdin: n = int(line.strip()) assert n <= MAXP * MAXP if n == 1: print("1 = 1") # special case else: p, k, m = factor(n, prime) if k != 1: s = "{} = {}^{}".format(n, p, k) else: s = "{} = {}".format(n, p) while m != 1: p, k, m = factor(m, prime) if k != 1: s += " * {}^{}".format(p, k) else: s += " * {}".format(p) print(s)