炊事员n元买m只鸡,母鸡、公鸡、小鸡组合大揭秘!
```python n, m = map(int, input().split()) solutions = [] for a in range(1, n // 15 + 1): for b in range(1, n // 10 + 1): c = m - a - b if c <= 0: continue if a * 15 + b * 10 + c * 5 == n: solutions.append((a, b, c)) if solutions: for a, b, c in solutions: print(f"mu:{a} gong:{b} xiao:{c}") else: print("No solution") ``` ######[AI问答 | 137点数解答 | 2026-01-02 18:58:00]
相关提问