Advertisement
jbn6972

ViceCity

Dec 5th, 2021
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. for _ in range(int(input())):
  2. n = int(input())
  3. cheat1,cheat2 = 0,0
  4.  
  5. while n%10 == 0:
  6. n //= 10
  7. cheat1 +=1
  8. while n%2 ==0:
  9. n //= 2
  10. cheat2 += 1
  11.  
  12. if n!=1 or cheat2>cheat1:
  13. print("No")
  14. else:
  15. print("Yes")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement