码迷,mamicode.com
首页 >  
搜索关键字:欧拉计划    ( 70个结果
欧拉计划·第十一题
题目11:在20×20的网格中同一直线上四个数的最大乘积是多少? 在以下这个20*20的网格中,四个处于同一对角线上的相邻数字用红色标了出来: 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62...
分类:其他好文   时间:2015-03-20 23:53:17    阅读次数:739
欧拉计划·第十题
题目10:计算两百万以下所有质数的和。 10以下的质数的和是2 + 3 + 5 + 7 = 17. 找出两百万以下所有质数的和。 源码 STDMETHODIMP COuLa::Test10(int number) { // TODO: 在此添加实现代码 __int64 sum = 2; for(int i = 2; 2*i-1 <= number; i++) {...
分类:其他好文   时间:2015-03-20 22:06:50    阅读次数:130
欧拉计划·第七题
题目7:找出第10001个质数。 前六个质数是2,3,5,7,11和13,其中第6个是13. 第10001个质数是多少? 源码 STDMETHODIMP COuLa::Test7(int number) { // TODO: 在此添加实现代码 int iNumberForCout = 1; int iNumberForOutput = 0; int iN...
分类:其他好文   时间:2015-03-18 20:34:55    阅读次数:137
欧拉计划·第八题
题目8:找出这个1000位数字中连续13个数字乘积的最大值。 找出以下这个1000位的整数中连续13个数字的最大乘积。 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 858615607891129494954595...
分类:其他好文   时间:2015-03-18 20:33:27    阅读次数:150
欧拉计划·第五题
题目5:找出最小的能被1-20中每个数整除的数。 2520是最小的能被1-10中每个数字整除的正整数。 最小的能被1-20中每个数整除的正整数是多少? 源码 STDMETHODIMP COuLa::Test5(int number) { // TODO: 在此添加实现代码 int iForNumber[MAX_PATH] = {0}; int iForFinalN...
分类:其他好文   时间:2015-03-17 20:16:00    阅读次数:241
欧拉计划·第六题
题目6:平方和与和平方的差是多少? 前十个自然数的平方和是: 12 + 22 + ... + 102 = 385 前十个自然数的和的平方是: (1 + 2 + ... + 10)2 = 552 = 3025 所以平方和与和的平方的差是3025  385 = 2640. 找出前一百个自然数的平方和与和平方的差。 源码 STDMETHODIMP CO...
分类:其他好文   时间:2015-03-17 20:12:46    阅读次数:109
欧拉计划·第四题
题目4:找出由两个三位数乘积构成的回文。 一个回文数指的是从左向右和从右向左读都一样的数字。最大的由两个两位数乘积构成的回文数是9009 = 91 * 99. 找出最大的有由个三位数乘积构成的回文数。 源代码 STDMETHODIMP COuLa::Test4(int iMaxNumber) { // TODO: 在此添加实现代码 int outputNum...
分类:其他好文   时间:2015-03-16 19:22:37    阅读次数:100
欧拉计划(python) problem 23
Non-abundant sums Problem 23 A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be ...
分类:编程语言   时间:2015-02-05 09:38:22    阅读次数:169
欧拉计划(python) problem 24
Lexicographic permutations Problem 24 A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutation...
分类:编程语言   时间:2015-02-05 09:35:31    阅读次数:155
欧拉计划(python) problem 31
Coin sums Problem 31 In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p). It ...
分类:编程语言   时间:2015-02-04 09:34:29    阅读次数:194
70条   上一页 1 2 3 4 5 6 7 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!