그레프탐색

https://www.acmicpc.net/problem/11322코드from collections import dequen= int(input())def bfs(division): q = deque(["1"]) while q: num = q.popleft() if int(num) % division == 0: return num q.append(num+"0") q.append(num+"1")for i in range(n): print(bfs(int(input())))
딜레이레이
'그레프탐색' 태그의 글 목록