酷代码 AI
菜单
服务商
DeepSeek字节豆包讯飞星火
更多选项

炊事员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]

本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]