问题描述:设有11种不问的钱币各若干张,可用这II种钱币产生许多不同的面值。试 设计一个算法,计算给定的某个面值,能有多少种不同的产生方法。例如有1分3张,...
代码说明:
问题描述:设有11种不问的钱币各若干张,可用这II种钱币产生许多不同的面值。试 设计一个算法,计算给定的某个面值,能有多少种不同的产生方法。例如有1分3张,2分 3张,5分1张,则能组成7分面值的方法有:3个1分+2个2分,1个1分十3个2分,2 个1分+1个5分,1个2分+1个5分共四种。 ^编程任务:对于给定的II种不同钱币,编程计算某个给定面值能有多少种不同的产生 方法。-Problem Description: There should be 11 kinds of coins did not ask the number of beds available this II produced many different kinds of coin denominations. Try to design an algorithm to calculate a nominal value of a given that there can be many different returned. For instance, a sub-3, 2 points 3, 5 min 1, then can be composed of seven sub-par methods are: 3 1 min+2 2 points, a 1 minute 10 3 2 points, 2 1 points+1 5 points, a 2 min+1 5 minutes of four kinds. ^ Programming task: for a given II different coins, the calculation of a given program can have many different denominations is returned.
下载说明:请别用迅雷下载,失败请重下,重下不扣分!