Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- t0= time.clock()
- def Main(num):
- a = num
- z1 = 0
- z2 = 0
- sch = 0
- while a > 1:
- tel = 2
- untel = 3
- z2 = z1
- if a % tel == 0:
- a //= tel
- #print(tel)
- z1 = tel
- elif a % untel == 0:
- a //= untel
- #print(untel)
- z1 = untel
- else:
- while a % untel != 0:
- untel +=2
- a //= untel
- z1 = untel
- if z1 != z2:
- sch += 1
- return sch
- print(Main(1000))
- t1 = time.clock() - t0
- print("Time elapsed: ", t1 - t0)
Advertisement
Add Comment
Please, Sign In to add comment