唯一数字的总和

时间:2018-11-28 19:03:17

标签: python python-3.x algorithm

有两个唯一数字best_partition = comminity_list.copy 4。如果可以表示为唯一数字的最小数量之和,那么这个数字也是唯一的。

7

找到所需的最小数量实际上可以通过基于dp的硬币找零问题来解决,但是找到满足条件的组合的有效方法是什么?

case 1: 11 can be represented as  sum of 4+7 and minimum number required here is 2.
case 2: 474 can be represented as 474 iteslf and min number required here is 1.
case 3: 478 can be represented as 474+4 and min number required here is 2.
case 4: 482 can be represented as 474+4+4 and min number required here is 3.
case 5: 13 can't be represented as a sum of them

0 个答案:

没有答案