文件名称:作业1.2
介绍说明--下载内容来自于网络,使用问题请自行百度
公鸡每只5元,母鸡每只3元,小鸡3只一元,N元买N只鸡,有多少种买法?
1. 试编程解决买鸡问题。用户输入N,能输出所有的买法,其中N以值调用的形式在函数参数表中出现。
2. 分析算法的复杂度,结合复杂度分析考虑算法如何优化。(5 yuan per cock, 3 yuan per hen, 3 chicks a dollar, N yuan to buy N chicken, how many kinds of buy?
1. trial programming to solve the problem of chicken. The user input N, can output all buy method, in which N calls in the form of value call in the function parameter table appears.
2. analyzing the complexity of the algorithm and considering the complexity analysis to consider how to optimize the algorithm.)
1. 试编程解决买鸡问题。用户输入N,能输出所有的买法,其中N以值调用的形式在函数参数表中出现。
2. 分析算法的复杂度,结合复杂度分析考虑算法如何优化。(5 yuan per cock, 3 yuan per hen, 3 chicks a dollar, N yuan to buy N chicken, how many kinds of buy?
1. trial programming to solve the problem of chicken. The user input N, can output all buy method, in which N calls in the form of value call in the function parameter table appears.
2. analyzing the complexity of the algorithm and considering the complexity analysis to consider how to optimize the algorithm.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.