ProjectEuler 008题】的更多相关文章

题目: The four adjacent digits in the 1000-digit number that have the greatest product are 9 9 8 9 = 5832. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 8586156078911294949545950173795833195285320…
退役选手打发时间的PE计划 挂在这里主要是dalao们看到有什么想交流的东西可以私聊哦(站内信或邮箱吧)~~当然现在高三也不怎么能上网. 2017/8/11  595 :第一题QAQ 2017/8/12  598 2017/8/12  590 难度评分:8 2017/8/14  601 难度评分:3 2017/8/14  605 :概率方程. 2017/8/15  608 :炒鸡开心,居然切出来了. 难度评分:7 2017/8/16  607 :以为会被卡精度的,结果直接就过了. 难度评分:4…
题目: 2520 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? 此题就是求最小公倍数的,刚开始我考虑的太复杂,打算求出每个数的素数因子,然后去处一…
题目: A 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. 代码: 1 #include<iostream…
题目:By 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? 方法一: 1 #include<iostream> 2 using namespace std; 3 bool isPrime(long long num); 4 int main() { 5 int count = 1;…
题目: The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)2 = 552 = 3025 Hence the difference between the sum of the squares of the first ten…
1 #include<iostream> 2 using namespace std; 3 4 int main() { 5 bool isPalindromic (int num); 6 int res = 0; 7 8 for(int i = 100; i < 1000 ; i++) 9 for(int j = 100; j < 1000; j++) { 10 if( isPalindromic(i*j) && i*j > res) 11 res = i*…
1 //题目:The prime factors of 13195 are 5, 7, 13 and 29. 2 //What is the largest prime factor of the number 600851475143 ? 1 #include<iostream> 2 using namespace std; 3 int main() { 4 long long N = 600851475143;//int和long都为32位,long long 为64位 5 int i;…
nim 是一门风格类似python的静态编译型语言,官方网站:http://nim-lang.org 如果你想折腾nim的编辑环境,可以用sublime text3 +插件nimlime,notepad++,atom也有相应的插件,想折腾可以自己尝试,这里先不细说. 我最近想入门nim,用nim实现projecteuler的解题是个很好的练习方式,那么从第一题开始吧: projecteuler 第一题链接: https://projecteuler.net/problem=1 题目大意是:计算1…
退役选手打发时间的PE计划 挂在这里主要是dalao们看到有什么想交流的东西可以私聊哦(站内信或邮箱吧) 2017/8/11  PE595 :第一题QAQ 2017/8/12  PE598 2017/8/12  PE590 难度评分:8 2017/8/14  PE601 难度评分:3 2017/8/14  PE605 :概率方程. 2017/8/15  PE608 :炒鸡开心,居然切出来了. 难度评分:7 2017/8/16  PE607 :以为会被卡精度的,结果直接就过了. 难度评分:4 20…