Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = 5+1
- factors = []
- def addFactors(n):
- global factors
- temp=[]
- for j in range(1,i):
- if i%j==0:
- temp.append(i)
- factors.append(temp)
- for i in range(1,6):
- addFactors(i)
- def isUntouchable(n):
- global factors
- for i in range(n):
- if len(factors)<i+1:
- addFactors(i+1)
- if sum(factors[i])==n:
- return True
- return False
- while True:
- if isUntouchable(num):
- break
- num+=1
- print(num)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement