Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(n):
- s = ""
- while n > 0:
- s += str(n % 6)
- n //= 6
- s = s[::-1]
- return s
- Min = 1000000000000000
- for N in range(1, 1000):
- b = f(N)
- if int(b) % 3 == 0:
- b = b + f(N)[:2]
- else:
- b = b + f((int(b) % 3) * 10)
- R = int(b, 6)
- if R > 680:
- Min = min(R, Min)
- print(Min)
Advertisement
Add Comment
Please, Sign In to add comment