Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def PE33():
- possibles = []
- for x in range(10, 100, 1):
- for y in range(10, 100, 1):
- if x < y:
- fX = float(x)
- fY = float(y)
- val = fX / fY
- sX = str(x)
- sY = str(y)
- for z in range(1, 10, 1):
- sZ = str(z)
- if sX.count(sZ) == 1 and sY.count(sZ) == 1:
- jim = sX.replace(sZ, '')
- jack = sY.replace(sZ, '')
- if jim != '0' and jack != '0' and float(jim) / float(jack) == val and int(jim) < int(jack):
- if val not in possibles:
- possibles.append(val)
- dividend = 1
- for x in possibles:
- dividend *= x
- answer = 1 / dividend
- return int(round(answer, 0))
- PE33()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement