欧拉计划之Largest palindrome product
计划 product 欧拉 Palindrome Largest
2023-09-27 14:28:45 时间
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.
LeetCode 39. Combination Sum 给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的数字可以无限制重复被选取。
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimit
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.
Find the largest palindrome made from the product of two 3-digit numbers.
def depart(n): DList = [] while n = 10 : DList.append(n % 10) n = n/10 DList.append(n) return DList maxmulti = 10000 for i in xrange(100,1000): for j in xrange(100,1000): multi = i * j MList = depart(multi) RList = MList[:] RList.reverse() if RList == MList: if multi maxmulti: maxmulti = multi print {0} * {1}.format(i,j) print maxmulti
。。。。。
722 * 968
759 * 953
803 * 909
803 * 959
831 * 968
844 * 957
858 * 966
869 * 982
894 * 957
913 * 993
906609
LeetCode 39. Combination Sum 给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的数字可以无限制重复被选取。
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimit
相关文章
- 实战讲解MySQL的expain执行计划,面试官当场要了我
- 详解SQL优化必备:并行执行框架和执行计划
- IFAA开放能力,正式启动中小企业互联网身份认证加速器计划
- 分享几个.NET 下的计划任务组件
- 数据中心扩张计划是建设还是收购?
- IT实施计划实战经验分享:避免失败
- 传大数据先锋Cloudera计划今年晚些时候上市
- 浪潮“151计划”:信息安全 没有“偏远地区”
- Forrester最佳案例:西班牙银行的创新计划
- 云栖社区的粉丝计划与博主大赛
- 助力银行去IOE,蚂蚁金服开放SOFA云平台发布金融云2.0计划
- 工业智能网关BL110应用之二十六: 如何配置任务计划
- 学MySQL执行计划觉今是而昨非
- 《战争论 -- 战争计划》笔记