摘要: def greedy_change(amount, coins): coins.sort(reverse=True) # 将硬币按面额从大到小排序 change = [] for coin in coins: while amount >= coin: amount -= coin change.a 阅读全文
posted @ 2023-11-01 09:26 年轻人——001 阅读(32) 评论(0) 推荐(0) 编辑