dxnge

tsk 19

Nov 4th, 2021
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. for i in range(1, 1000):
  2.     x = i
  3.     a, b = 0, 0
  4.     while x > 0:
  5.         if x % 2 == 0:
  6.             a += 1
  7.         else:
  8.             b += x%6
  9.         x = x//6
  10.     if a == 1 and b == 4:
  11.         print(i)
  12.         break
  13.  
Advertisement
Add Comment
Please, Sign In to add comment