add: boj/16953.py

This commit is contained in:
Gyubin Han
2024-05-08 00:27:30 +09:00
parent 1044eb92db
commit a9f7eb0b15

16
boj/16953.py Normal file
View File

@@ -0,0 +1,16 @@
a,b=map(int,input().split())
count=0
while a<b:
if b%2==0:
b//=2
elif b%10==1:
b//=10
else:
break
count+=1
if a==b:
print(count+1)
else:
print(-1)