Ad
Code
Diff
  • def reverse_fact(input):
        start = 1
        while input % start == 0: 
            input /= start
            print(input)
            if input == 1: return start
            start += 1
        return 0
    • def reverse_fact(input):
    • start = 1
    • while input != 1:
    • start += 1
    • if input % start != 0 :
    • return 0
    • while input % start == 0:
    • input /= start
    • print(input)
    • return start
    • if input == 1: return start
    • start += 1
    • return 0