欧拉计划--C++编程突破
Kevin-壬生狼
新手小白,努力学习,只为发现自己的无知。
展开
-
欧拉计划--C++编程突破10
欧拉计划–C++编程突破10Problem 19You are given the following information, but you may prefer to do some research for yourself.1 Jan 1900 was a Monday.Thirty days has September,April, June and November.All the rest have thirty-one,Saving February alone,Which原创 2020-12-04 21:15:57 · 132 阅读 · 0 评论 -
欧拉计划--C++编程突破9
欧拉计划–C++编程突破9Problem 17If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how man原创 2020-12-03 10:47:28 · 190 阅读 · 0 评论 -
欧拉计划--C++编程突破8
欧拉计划–C++编程突破8Problem 15Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.How many such routes are there through a 20×20 grid?问题15从一个2×2网格的左上角开始,只能向右原创 2020-12-02 16:21:36 · 200 阅读 · 0 评论 -
欧拉计划--C++编程突破7
欧拉计划–C++编程突破7欧拉计划:https://projecteuler.net/problem=13Problem 13Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.问题13求出下列100个50位数字之和的前十位数字。其余略,具体请到网站查看。思路分析:简单来说,看到这个题,第一个想法你要是想用大整数,那我劝这位年轻人耗子尾汁,这道题已知要处理的各项数字,就不原创 2020-11-30 16:31:36 · 158 阅读 · 0 评论 -
欧拉计划--C++编程突破6
欧拉计划–C++编程突破6Problem 11In the 20×20 grid below, four numbers along a diagonal line have been marked in red.The product of these numbers is 26 × 63 × 78 × 14 = 1788696.What is the greatest product of four adjacent numbers in the same direction (up, down原创 2020-11-29 13:10:07 · 182 阅读 · 0 评论 -
欧拉计划--C++编程突破5
欧拉计划–C++编程突破5Problem 9A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,a2 + b2 = c2 For example,32 + 42=9 + 16 = 25 = 52。There exists exactly one Pythagorean triplet for which a + b + c = 1000.Find the product abc.问原创 2020-11-28 20:43:32 · 114 阅读 · 0 评论 -
欧拉计划--C++编程突破4
欧拉计划–C++编程突破4Problem 7By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.What is the 10 001st prime number?问题7通过列出前六个素数:2,3,5,7,11和13,我们可以看到第6个素数是13。 第10001素数是多少?解题思路:通过打印素数表来直接找到对应素数就好,使用一个长数组,每次发现一个素原创 2020-11-27 17:02:23 · 104 阅读 · 0 评论 -
欧拉计划--C++编程突破3
Problem 52520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?问题52520是一个最小的数,它可以被从1到10的每个数除以,没有任何余数。 什原创 2020-11-26 20:05:55 · 231 阅读 · 0 评论 -
欧拉计划--C++编程突破2
欧拉计划–C++编程突破2Problem 3The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?13195的质因数是5、7、13和29。 数600851475143的最大质因数是多少?解题思路:与其思考最大质因数是多少,不如去思考怎么将非质因数剔除,首先这个数挺大,但是LL能放下,那就直接用LL类型解决,但是还是要压缩数据范围,首先,不原创 2020-11-25 19:54:04 · 555 阅读 · 0 评论 -
欧拉计划--C++编程突破1
欧拉计划–C++编程突破1Problem 1Multiples 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.Find the sum of all the multiples of 3 or 5 below 1000.3或5的倍数在小于10的自然数中,3或5的倍数有3、原创 2020-11-25 17:29:13 · 242 阅读 · 0 评论