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的更多相关文章

  1. UOJ 52 元旦激光炮

    http://uoj.ac/problem/52 题意:每次可以得到3个序列中 思路:每次分别取出三个序列的K/3长度的位置,取最小的那个,然后每次减掉它,总复杂度是Nlog3N #include & ...

  2. #52. 【UR #4】元旦激光炮 (交互式题)

    链接:http://uoj.ac/problem/52 刚刚越过绝境长城,只见天空中出现了炫目的光芒 —— 圣诞老人出现了. 元旦三侠立刻进入战斗.生蛋侠.圆蛋侠和零蛋侠分别有 na,nb,ncna, ...

  3. CodeForces 52C Circular RMQ(间隔周期段树,间隔更新,间隔总和)

    转载请注明出处:http://blog.csdn.net/u012860063 题目链接:http://codeforces.com/problemset/problem/52/C You are g ...

  4. qsc52(三角形线性插值)

    题目链接:http://qscoj.cn/problem/52/ 题意:中文题诶- 思路:水题,只要知道三角形插值和判断点在三角形内就OK了 关于三角形插值:http://www.cnblogs.co ...

  5. 【UVa 116】Unidirectional TSP

    [Link]:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_probl ...

  6. Levmar:Levenberg-Marquardt非线性最小二乘算法

    Levmar:Levenberg-Marquardt非线性最小二乘算法 eryar@163.com Abstract. Levmar is GPL native ANSI C implementati ...

  7. 【例题5-2 UVA - 101】The Blocks Problem

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 用vector模拟就好. resize的时候,只是把多余的清理掉. 原先的不会变的. [错的次数] 在这里输入错的次数 [反思] 在 ...

  8. PHP curl报错“Problem (2) in the Chunked-Encoded data”解决方案

    $s = curl_init(); curl_setopt($s, CURLOPT_POST, true); curl_setopt($s, CURLOPT_POSTFIELDS, $queryStr ...

  9. 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 ...

随机推荐

  1. test框架搭建

     http://blog.csdn.net/huilan_same  https://github.com/huilansame/Test_framework  

  2. UVa 10693 - Traffic Volume

    題目:車速為v,車之間的距離最少為v^2/(2f)(防止裝車),車長為L,問1小時最多能走過幾輛車. 分析:數學.物理.             根據題意能够列出方程:nL + (n-1)d = nL ...

  3. Webstorm配置运行React Native

    Webstorm配置运行React Native 1.选择配置 2.选择npm,设置package等参数 3.添加拓展工具 4.配置拓展工具(核心啊) 5.运行测试,ok的.

  4. STL 集合部分操作

    3.28更新 在EOJ 1641 集合栈计算机中,使用并集和补集时候,第五个参数使用x.begin()会报错:assignment of read-only location,而使用inserter( ...

  5. 79.员工薪水报表 Extjs 页面

    1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8" ...

  6. Flink之DataStreamAPI入门

    目录 Types Transformations Defining UDFs 本文API基于Flink 1.4 def main(args: Array[String]) { // 第一种会自动判断用 ...

  7. leetcode数组相关

    目录 4寻找两个有序数组的中位数 11盛最多水的容器,42接雨水 15三数之和,16最接近的三数之和,18四数之和 26/80删除排序数组中的重复项, 27移除元素 31下一个排列 53最大子序和 5 ...

  8. bzoj1705[Usaco2007 Nov]Telephone Wire 架设电话线(dp优化)

    1705: [Usaco2007 Nov]Telephone Wire 架设电话线 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 441  Solved: ...

  9. MSSQL:删除系统作业计划

    use [msdb]declare @job_name varchar(100)set @job_name = N'EveryDayBackup.Subplan_1'--注:jobName为维护计划对 ...

  10. C - Anton and Danik

    Problem description Anton likes to play chess, and so does his friend Danik. Once they have played n ...