Originally posted by electronixtar at 2007-3-10 06:42 PM:
排序,然后筛选 个位数和十位数 相加为 80 的组合(因为结果要求为171780)。筛选完后再求组合。
在没引用qzwqzw的代码之前,这样的想法就已经尝试过,
代码写到中途才发现在编写 筛选 时纯粹为走弯路.
因为筛选也是需要 枚举 排列组合.....呵呵....
为什么不直接给出结果呢?既如此,排序又有何用呢...呵呵.....
Originally posted by electronixtar at 2007-3-10 06:42 PM:
Sort, then filter combinations where the sum of the units digit and tens digit is 80 (since the result requires 171780). After filtering, then find the combinations.
Before referring to qzwqzw's code, such an idea had already been tried.
The code was only halfway written when it was discovered that when writing the filter for , it was purely a detour.
Because filtering also requires enumerating permutations and combinations..... Hehe....
Why not just give the result directly? If that's the case, what's the use of sorting... Hehe.....