1697
1697번 파이썬
bfs를 이용한 문제 import sys from collections import deque input = sys.stdin.readline n, k = map(int, input().split()) queue = deque([n]) count = [0]*100001 while queue: roc = queue.popleft() if roc == k: print(count[k]) break if 0
bfs를 이용한 문제 import sys from collections import deque input = sys.stdin.readline n, k = map(int, input().split()) queue = deque([n]) count = [0]*100001 while queue: roc = queue.popleft() if roc == k: print(count[k]) break if 0