output_description: Print the minimum number of coins in a line.
input_description: n m
      d1 d2 ... dm
      
  
  Two integers n and m are given in the first line. The available denominations
  are given in the second line.
attempt: from collections import deque
  
  n, m = map(int, input().split())
  d = list(map(int, input().split()))
  dp = [100000 for i in range(n + 1)]
  
  dp[n] = 0
  que = deque()
  que.append(n)
  
  while len(que) > 0:
      front = que.popleft()
      for i in d:
          if front - i == 0:
              print(dp[front] + 1)
              que.clear()
              break
          if front > i:
              dp[front - i] = min(dp[front] + 1, dp[front - i])
              que.append(front - i)
          else:
              break
  
problem_description: Coin Changing Problem
  
    
  
  Find the minimum number of coins to make change for n cents using coins of
  denominations d1, d2,.., dm. The coins can be used any number of times.
samples: [{"input": "55 4\n    1 5 10 50", "output": "2"}, {"input": "15 6\n    1 2 7 8 12 50", "output": "2"}, {"input": "65 6\n    1 2 7 8 12 50", "output": "3"}]