spacerose

Untitled

Sep 11th, 2022 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. x = int(input('x = '))
  2. if x == 1:
  3. print('YES')
  4. else:
  5. while x > 2: // делим на 2 пока не число не станет == 2 или 1
  6. x = x / 2
  7. if x == 2:
  8. print('YES')
  9. else:
  10. print('NO')
  11.  
Advertisement
Add Comment
Please, Sign In to add comment