Problem 52
Problem 52
It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.
数字125874和125874*2(251748)一样,拥有相同的、不同序的数字。
Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits.
找到最小的正整数x,使得2x, 3x, 4x, 5x, 6x拥有相同的数字。
multi = 6
for x in range(1, 999999):
nums = []
flag = True
for y in range(1, multi+1):
num = x * y
nums.append(num)
digits = sorted(str(nums[0]))
for num in nums:
if sorted(str(num)) != digits:
flag = False
if not flag:
continue
else:
print(nums, '/n', digits)
break
Problem 52的更多相关文章
- UOJ 52 元旦激光炮
http://uoj.ac/problem/52 题意:每次可以得到3个序列中 思路:每次分别取出三个序列的K/3长度的位置,取最小的那个,然后每次减掉它,总复杂度是Nlog3N #include & ...
- #52. 【UR #4】元旦激光炮 (交互式题)
链接:http://uoj.ac/problem/52 刚刚越过绝境长城,只见天空中出现了炫目的光芒 —— 圣诞老人出现了. 元旦三侠立刻进入战斗.生蛋侠.圆蛋侠和零蛋侠分别有 na,nb,ncna, ...
- CodeForces 52C Circular RMQ(间隔周期段树,间隔更新,间隔总和)
转载请注明出处:http://blog.csdn.net/u012860063 题目链接:http://codeforces.com/problemset/problem/52/C You are g ...
- qsc52(三角形线性插值)
题目链接:http://qscoj.cn/problem/52/ 题意:中文题诶- 思路:水题,只要知道三角形插值和判断点在三角形内就OK了 关于三角形插值:http://www.cnblogs.co ...
- 【UVa 116】Unidirectional TSP
[Link]:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_probl ...
- Levmar:Levenberg-Marquardt非线性最小二乘算法
Levmar:Levenberg-Marquardt非线性最小二乘算法 eryar@163.com Abstract. Levmar is GPL native ANSI C implementati ...
- 【例题5-2 UVA - 101】The Blocks Problem
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 用vector模拟就好. resize的时候,只是把多余的清理掉. 原先的不会变的. [错的次数] 在这里输入错的次数 [反思] 在 ...
- PHP curl报错“Problem (2) in the Chunked-Encoded data”解决方案
$s = curl_init(); curl_setopt($s, CURLOPT_POST, true); curl_setopt($s, CURLOPT_POSTFIELDS, $queryStr ...
- Total Commander 8.52 Beta 1
Total Commander 8.52 Beta 1http://www.ghisler.com/852_b1.php 10.08.15 Release Total Commander 8.52 b ...
随机推荐
- @Repository @Service 和@Autowired 的使用
解释: @Controller 声明Action组件 @Service 声明Service组件 @Service("myMovieLister") @Repositor ...
- thymeleaf+springboot找不到html,只返回了字符串
在浏览器用链接http://localhost:8080/city/page/list 访问时页面上只出现了cityList字样,预期是返回cityList.html 解决:在controller中使 ...
- 用HttpCombiner来减少js和css的请问次数
HttpCombiner也不记得是谁写的了,功能是把多个js文件或css文件合并到一块,压缩一下一起发给客户端来优化网站. 用法是这样的: <script type="text/jav ...
- Windows 驱动开发 - 8
最后的一点开发工作:跟踪驱动. 一.驱动跟踪 1. 包括TMH头文件 #include "step5.tmh" 2. 初始化跟踪 在DriverEntry中初始化. WPP_INI ...
- [RK3288][Android6.0] U-boot 启动流程小结【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/52536093 Platform: RK3288OS: Android 6.0Version: ...
- SQL2000数据库定期自动备份与修改
SQL2000数据库定期自动备份与修改 http://www.veryhuo.com 2009-11-19 烈火网 投递稿件 我有话说 在SQL server企业管理器中,可以设置数据库的定期自动 ...
- Spark之MLlib
目录 Part VI. Advanced Analytics and Machine Learning Advanced Analytics and Machine Learning Overview ...
- selenium3 + Python - 处理浏览器弹窗(转载)
作者:Real_Tino 转载链接:https://blog.csdn.net/real_tino/article/details/59068827 我们在浏览网页时经常会碰到各种花样的弹窗,在做UI ...
- php 制作略缩图
一.需求 最近公司的项目中有个需求,就是用户上传自己的微信二维码,然后系统会自动将用户的微信二维码合并到产品中 二.分析 因为该系统是手机端的,所以从用户端的体验出发,用户当然是直接在微信上保存二维码 ...
- JDK多任务执行框架(Executor框架)
Executor的常用方法 为了更好的控制多线程,JDK提供了一套线程框架Executor,帮助开发人员有效地进行线程控制.它们都在java.util.concurrent包中,是JDK开发包的核心. ...