
【C/C++】
文章平均质量分 74
sytzz
爱好~
展开
-
【ProjectEuler】ProjectEuler_055(10000以下有多少Lychrel数?)
#pragma once#include #include using namespace std;class MoonBigNum{public: MoonBigNum(void); MoonBigNum(const string &num); MoonBigNum(const UINT32 &num); MoonBigNum(const Moon原创 2013-06-02 18:58:04 · 2906 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_042
// Problem 42// 25 April 2003//// The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so the first ten triangle numbers are://// 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...原创 2012-04-11 13:13:05 · 6416 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_038
// Problem 38// 28 February 2003//// Take the number 192 and multiply it by each of 1, 2, and 3://// 192 1 = 192// 192 2 = 384// 192 3 = 576// By concatenating each product we get the 1 to原创 2011-11-05 15:40:11 · 2205 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_067
// By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.// // 3// 7 4// 2 4 6// 8 5 9 3// // That is, 3 + 7 +原创 2011-11-05 15:41:03 · 2521 阅读 · 1 评论 -
【ProjectEuler】ProjectEuler_037
// Problem 37// 14 February 2003//// The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage原创 2011-11-05 15:39:46 · 1091 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_036
// Problem 36// 31 January 2003//// The decimal number, 585 = 10010010012 (binary), is palindromic in both bases.//// Find the sum of all numbers, less than one million, which are palindromic in原创 2011-11-05 15:39:24 · 816 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_034
// Problem 34// 03 January 2003//// 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.//// Find the sum of all numbers which are equal to the sum of the factorial of their digits.//原创 2011-11-05 15:38:38 · 668 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_033
// Problem 33// 20 December 2002//// The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is corr原创 2011-11-05 15:37:59 · 753 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_032
// Problem 32// 06 December 2002// // 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, the 5-digit number, 15234, is 1 through 5原创 2011-11-05 15:37:23 · 583 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_031
// Problem 31// 22 November 2002//// In England the currency is made up of pound, O, and pence, p, and there are eight coins in general circulation://// 1p, 2p, 5p, 10p, 20p, 50p, O1 (100p) and O原创 2011-11-05 15:37:05 · 545 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_029
// Problem 29// 25 October 2002//// Consider all integer combinations of ab for 2 a 5 and 2 b 5://// 22=4, 23=8, 24=16, 25=32// 32=9, 33=27, 34=81, 35=243// 42=16, 43=64, 44=256, 45=1024//原创 2011-11-05 15:36:19 · 591 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_028
// Problem 28// 11 October 2002//// Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows://// 21 22 23 24 25// 20 7 8 9 10// 19 6原创 2011-11-05 15:36:01 · 514 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_027
// Problem 27// 27 September 2002//// Euler published the remarkable quadratic formula://// n² + n + 41//// It turns out that the formula will produce 40 primes for the consecutive values n = 0原创 2011-11-05 15:35:44 · 619 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_041
// Problem 41// 11 April 2003//// 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 pr原创 2012-04-11 12:56:27 · 2203 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_040
// Problem 40// 28 March 2003//// An irrational decimal fraction is created by concatenating the positive integers://// 0.123456789101112131415161718192021...//// It can be seen that the 12t原创 2012-04-11 12:00:16 · 1980 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_052(找出最小的正整数x,使得2x, 3x, 4x, 5x和6x都包含同样的数字)
#pragma once#include #include #include using namespace std;class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt原创 2013-04-21 18:26:56 · 3160 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_054(在扑克游戏中玩家1能赢多少局?)
// Poker hands// Problem 54// In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way://// High Card: Highest value card.//原创 2013-04-21 18:28:57 · 3705 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_053(对于1≤n≤100,C(n,r)有多少超过100万?)
// Combinatoric selections// Problem 53// There are exactly ten ways of selecting three from five, 12345://// 123, 124, 125, 134, 135, 145, 234, 235, 245, and 345//// In combinatoric原创 2013-04-21 18:27:52 · 2640 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_051(找出最小的能够通过改变同一部分得到八个质数的质数)
#pragma once#include #include #include using namespace std;class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt原创 2013-03-24 21:46:14 · 2199 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_050(找到100万以内最多连续素数的和,它也同时是个素数)
#pragma once#include #include #include using namespace std;class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt原创 2013-03-23 20:35:57 · 2764 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_049
#pragma once#include #include #include using namespace std;class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt原创 2013-03-13 20:52:13 · 2088 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_047
#pragma once#include #include #include using namespace std;class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt原创 2013-03-11 21:09:26 · 2061 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_044
#pragma once#include class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt // Access: public原创 2013-03-11 20:15:52 · 2038 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_048
// Self powers// Problem 48// The series, 1^1 + 2^2 + 3^3 + ... + 10^10 = 10405071317.//// Find the last ten digits of the series, 1^1 + 2^2 + 3^3 + ... + 1000^1000.#include #includ原创 2013-03-11 22:26:16 · 2516 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_045
#pragma once#include class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt // Access: public原创 2013-03-10 21:53:10 · 2076 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_046
#pragma once#include class MoonMath{public: MoonMath(void); ~MoonMath(void); //************************************ // Method: IsInt // Access: public // Describe:原创 2013-03-10 22:23:22 · 2116 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_039
// Problem 39// 14 March 2003//// If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120.//// {20,48,52}, {24,45,51}, {原创 2012-04-11 11:18:49 · 2047 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_026
// Problem 26// 13 September 2002//// A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are given://// 1/2 = 0.5// 1/3 = 0原创 2011-11-05 15:35:27 · 596 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_025
// Problem 25// 30 August 2002// // The Fibonacci sequence is defined by the recurrence relation:// // Fn = Fn1 + Fn2, where F1 = 1 and F2 = 1.// Hence the first 12 terms will be:// // F1 = 1原创 2011-11-05 15:34:13 · 702 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_023
// Problem 23// 02 August 2002//// 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 1原创 2011-11-05 15:33:32 · 699 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_030
// Problem 30// 08 November 2002//// Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits://// 1634 = 14 + 64 + 34 + 44// 8208 = 84 + 24 + 04原创 2011-11-05 15:36:39 · 573 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_024
// Problem 24// 16 August 2002//// 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 permutations are list原创 2011-11-05 15:33:53 · 560 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_021
// Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).// If d(a) = b and d(b) = a, where a b, then a and b are an amicable pair and each of a and原创 2011-11-05 15:32:45 · 666 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_020
using System;using System.Collections.Generic;using System.Text;namespace projecteuler020{ class Program { static void Main(string[] args) { F1(); }原创 2011-11-05 15:32:16 · 485 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_019
// You 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 re原创 2011-11-05 15:31:58 · 538 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_017
using System;using System.Collections.Generic;using System.Text;namespace projecteuler017{ class Program { /// /// 1~19含的字母数 /// static int[] d1_19 = new原创 2011-11-05 15:31:06 · 437 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_013
// Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.// // 37107287533902102798797998220837590246510135740250// 463769376774900097126481248969700780504170182605原创 2011-11-05 15:29:20 · 467 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_011
// In the 2020 grid below, four numbers along a diagonal line have been marked in red.// // 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 6原创 2011-11-05 15:28:30 · 494 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_009
// 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原创 2011-11-05 15:27:25 · 414 阅读 · 0 评论 -
【ProjectEuler】ProjectEuler_005
// 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原创 2011-11-05 15:25:12 · 539 阅读 · 0 评论