Pandigital multiplesProblem 38Take the number 192 and multiply it by each of 1, 2, and 3:192 × 1 = 192192 × 2 = 384192 × 3 = 576By con...
转载 2017-03-29 22:01:00
61阅读
2评论
Pandigital multiplesProblem 38Take the number 192 and multiply it by each of 1, 2, and 3:192 × 1 = 192192 × 2 = 384192 × 3 = 576By concatenating each product we get the 1 to 9 pand
原创 2022-08-11 16:59:27
47阅读
Multiples of 3 and 5If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.F...
转载 2015-07-09 14:56:00
63阅读
2评论
1 --If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. 2 --Find the sum of all the multiples of 3 or 5 below 1000. 3 4 --set up iterator 5 function list_iter() 6 local i = 1; 7 local n = 100; 8 return functi...
转载 2014-03-07 07:22:00
99阅读
2评论
Pandigital productsProblem 32We shall say that an n-digit number is pandigital if it makes use of all the digits 1 ton exactly once; f...
转载 2017-03-29 06:38:00
127阅读
2评论
Pandigital primeProblem 41We shall say that an n-digit number is pandigital if it makes use of all the digits 1 ton exactly once. For ...
转载 2017-03-28 18:33:00
70阅读
2评论
Pandigital productsProblem 32We sh
原创 2022-08-11 15:15:26
47阅读
原题链接 考察:构造 思路: 对于n,如果每次x都能+-(n-1)的倍数,那么一定可以使x变成n的倍数. \(x = n*x-(n-1)*x\) \(x+(n-1)x = n*x\) 由此这三步为: 使a[1~n-1]变为n的倍数 使a[n]变成0 使a[1~n]变成0 ##Code #includ
转载 2021-06-08 02:30:00
145阅读
2评论
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime.What is the largest n-digit pandigi
转载 2017-07-28 12:22:00
83阅读
2评论
Pandigital prime setsProblem 118Using all of the digits 1 through 9 and concatenating them freely to form decimal integers, different ...
转载 2017-03-30 18:52:00
278阅读
2评论
Pandigital Fibonacci endsProblem 104The Fibonacci sequence is defined by the recurrence relation:Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.It turns out that F541, which contains 113 di
原创 2022-08-11 14:49:14
40阅读
Project Euler 1 Multiples of 3 and 5''' If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multip
原创 2013-10-04 11:39:46
476阅读
其实不难想,主要看你想的方向对不对思路(想看做法可以直接跳过这部分)\color{Red}(想看做法可以直接跳过这部分)(想看做法可以直接跳过这部分)ai想变成0a_i想变成0ai​想变成0一定是最后选择了某个长len得区间,使得自己是len的倍数一定是最后选择了某个长len得区间,使得自己是len的倍数一定是最后选择了某个长len得区间,使得自己是len的倍数但是要在3次操作把n个数变成0,说明这个len区间必须很大很大但是要在3次操作把n个数变成0,说明这个len区间必须很大很大但是要在3次操作
原创 2021-08-27 09:52:52
53阅读
思路:直接离线处理出每个ai 的10倍, 100倍, 1000倍的mod k 后的数值的个数,使用map<int,int >ss[12]存储, ss[x][y]表示 (ai*10x)%k=y的个数,最后处理一下,自己拼接自己的情况。
原创 2021-07-15 15:04:43
42阅读
#include<bits/stdc++.h> using namespace std; typedef long long LL; const int maxn=200000+10; map<int,int> M[11]; int ans[maxn]; short bit[maxn]; int main(){ int n,k,t...
原创 2022-11-09 18:36:24
56阅读
Pandigital Fibonacci endsProblem 104The Fibonacci sequence is defined by the recurrence relation:Fn = Fn−1 + Fn−2, where F1 = 1 and F2...
转载 2017-03-29 11:38:00
41阅读
2评论
其实不难想,主要看你想的方向对不对思路(想看做法可以直接跳过这部分)\color{Red}(想看做法可以直接跳过这部分)(想看做法可以直接跳过这部分)ai想变成0a
原创 2022-02-10 15:36:05
10阅读
令$d=\gcd(a,b)$,可以发现$c|(ax+by)$等价于$lcm(c,d)|(ax+by)$,因此不妨令$c'=lcm(c,d)$,然后将$a$、$b$和$c$同时除以$d$ 接下来设$(a,c)=d_{1}$,根据整除的传递性有$d_{1}|(ax+by)$,由于$d_{1}|ax$,可
Multiples of 3 and 5Problem 1
原创 2022-08-11 15:09:18
65阅读
* Solution.php<?php/** * Problem#1 * https://projecteuler.net/problem=1·
原创 2021-08-15 15:46:24
91阅读
  • 1
  • 2
  • 3
  • 4
  • 5