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评论
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阅读
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阅读
Multiples of 3 and 5Problem 1If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum o...
转载 2017-03-17 22:21:00
95阅读
2评论
Multiples of 3 and 5Problem 1If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum o...
转载 2017-03-17 22:21:00
51阅读
2评论
Problem 1If 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 multiples of 3 or 5 below 1000.
原创 2022-04-13 10:24:44
144阅读
Problem 1If 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 multiples of 3 or 5 below 1000.
原创 2022-11-05 11:03:26
239阅读
【题目一】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 multiples of 3 or 5 below 1000. 【翻译】10以下的
原创 2021-08-30 16:05:23
324阅读
【题目一】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 multiples of 3 or 5 below 1000. 【翻译】10以下的自
原创 2021-08-30 16:06:23
87阅读
原题链接 考察:构造 思路: 对于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评论
#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 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评论
其实不难想,主要看你想的方向对不对思路(想看做法可以直接跳过这部分)\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阅读
其实不难想,主要看你想的方向对不对思路(想看做法可以直接跳过这部分)\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$,可
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阅读
ai最大是10位数,考虑把所有数划分为10个集合a_i最大是10位数,考虑把所有数划分为10个集合ai​最大是10位数,考虑把所有数划分
原创 2022-02-10 18:06:34
39阅读
  • 1
  • 2
  • 3
  • 4
  • 5