main.cpp (7087B)
1 #include <iostream> 2 #include <chrono> 3 #include <ctime> 4 5 #include "Euler.h" 6 7 int main() { 8 Euler e; 9 std::clock_t start = std::clock(); 10 11 //std::cout << "problem 1: " << e.SumOfMultiplesOf3And5Ceiling1000() << std::endl; 12 //std::cout << "problem 2: " << e.SumOfEvenFibonacciNumbersCeiling4m() << std::endl; 13 //std::cout << "problem 3: " << e.LargestPrimeFactor() << std::endl; 14 //std::cout << "problem 4: " << e.LargestPalindromeFrom3DigitProduct() << std::endl; 15 //std::cout << "problem 5: " << e.DivisibleBy1To20() << std::endl; 16 //std::cout << "problem 6: " << e.DifferenceSumOfSquaresSquareOfSum100() << std::endl; 17 //std::cout << "problem 7: " << e.Get10001stPrime() << std::endl; 18 //std::cout << "problem 8: " << e.FindGreatestProductOf13AdjacentDigits() << std::endl; 19 //std::cout << "problem 9: " << e.SpecialPythagoreanTriplet() << std::endl; 20 //std::cout << "problem 10: " << e.SumOfPrimesUnder2m() << std::endl; 21 //std::cout << "problem 11: " << e.LargestProductInGrid() << std::endl; //wrong 22 //std::cout << "problem 12: " << e.TriangleNoWithGreaterThan500Divisors() << std::endl; 23 //std::cout << "problem 13: " << e.LargeSum() << std::endl; 24 //std::cout << "problem 14: " << e.CollatzConjecture() << std::endl; 25 //std::cout << "problem 15: " << e.LatticePaths() << std::endl; 26 //std::cout << "problem 16: " << e.DigitSum() << std::endl; 27 //std::cout << "problem 17: " << e.LetterCounter() << std::endl; 28 //std::cout << "problem 18: " << e.MaximumPathSum() << std::endl; 29 //std::cout << "problem 19: " << e.SundayCount() << std::endl; 30 //std::cout << "problem 20: " << e.FactorialDigitSum() << std::endl; 31 //std::cout << "problem 21: " << e.AmicableNumbers() << std::endl; 32 //std::cout << "problem 22: " << e.NameScores() << std::endl; 33 //std::cout << "problem 23: " << e.NonAbundantSums() << std::endl; 34 //std::cout << "problem 24: " << e.LexicographicPermutations() << std::endl; 35 //std::cout << "problem 25: " << e.ThousandDigitFibonacciNumber() << std::endl; 36 //std::cout << "problem 26: " << e.ReciprocalCycles() << std::endl; 37 //std::cout << "problem 27: " << e.QuadraticPrimes() << std::endl; 38 //std::cout << "problem 28: " << e.SpiralDiagonals() << std::endl; 39 //std::cout << "problem 29: " << e.DistinctPowers() << std::endl; 40 //std::cout << "problem 30: " << e.DigitFifthPowers() << std::endl; 41 //std::cout << "problem 31: " << e.CoinSums() << std::endl; 42 //std::cout << "problem 32: " << e.PanDigitalProducts() << std::endl; 43 //std::cout << "problem 33: " << e.DigitCancellingFractionsDenominator() << std::endl; 44 //std::cout << "problem 34: " << e.DigitFactorials() << std::endl; 45 //std::cout << "problem 35: " << e.NoOfCircularPrimes() << std::endl; 46 //std::cout << "problem 36: " << e.DoubleBasedPalindromes() << std::endl; 47 //std::cout << "problem 37: " << e.TruncatablePrimes() << std::endl; 48 //std::cout << "problem 38: " << e.PanDigitalMultiples() << std::endl; 49 //std::cout << "problem 39: " << e.MaximumRightAngledTriangles() << std::endl; 50 //std::cout << "problem 40: " << e.ChampernowneConstant() << std::endl; 51 //std::cout << "problem 41: " << e.PanDigitalPrime() << std::endl; 52 //std::cout << "problem 42: " << e.CodedTriangleNumbers() << std::endl; //wrong 53 //std::cout << "problem 43: " << e.SubStringDivisibility() << std::endl; 54 //std::cout << "problem 44: " << e.MinimizedPentagonalDifference() << std::endl; 55 //std::cout << "problem 45: " << e.TriangularPentagonalHexagonal() << std::endl; 56 //std::cout << "problem 46: " << e.GoldbachsOtherConjecture() << std::endl; 57 //std::cout << "problem 47: " << e.DistinctPrimeFactors() << std::endl; 58 //std::cout << "problem 48: " << e.SelfPowers() << std::endl; 59 //std::cout << "problem 49: " << e.PrimePermutations() << std::endl; 60 //std::cout << "problem 50: " << e.ConsecutivePrimeSum() << std::endl; 61 //std::cout << "problem 51: " << e.PrimeDigitReplacements() << std::endl; 62 //std::cout << "problem 52: " << e.PermutedMultiples() << std::endl; 63 //std::cout << "problem 53: " << e.CombinatoricSelections() << std::endl; 64 //std::cout << "problem 54: " << e.PokerHands() << std::endl; 65 //std::cout << "problem 55: " << e.LychrelNumbers() << std::endl; 66 //std::cout << "problem 56: " << e.PowerfulDigitSum() << std::endl; 67 //std::cout << "problem 57: " << e.SquareRootConvergents() << std::endl; 68 //std::cout << "problem 58: " << e.SpiralPrimes() << std::endl; 69 //std::cout << "problem 59: " << e.xorDecryption() << std::endl; //wrong 70 //std::cout << "problem 60: " << e.PrimePairSets() << std::endl; 71 //std::cout << "problem 61: " << e.CyclicFigurateNumbers() << std::endl; 72 //std::cout << "problem 62: " << e.CubicPermutations() << std::endl; 73 //std::cout << "problem 63: " << e.PowerfulDigitCounts() << std::endl; 74 //std::cout << "problem 64: " << e.OddPeriodSquareRoots() << std::endl; 75 //std::cout << "problem 65: " << "(skipped)" << std::endl; //<< e.ConvergentsOfE() << std::endl; 76 //std::cout << "problem 66: " << "(skipped)" << std::endl; //<< e.Diophantine() << std::endl; 77 //std::cout << "problem 67: " << e.MaximumPathSum() << std::endl; 78 //std::cout << "problem 68: " << e.Magic5GonRing() << std::endl; 79 //std::cout << "problem 69: " << e.EulerTotient() << std::endl; 80 //std::cout << "problem 70: " << e.TotientPermutation() << std::endl; 81 //std::cout << "problem 71: " << e.OrderedFractions() << std::endl; 82 //std::cout << "problem 72: " << e.CountingFractions() << std::endl; 83 //std::cout << "problem 73: " << e.CountingRangedFractions() << std::endl; 84 //std::cout << "problem 74: " << e.DigitFactorialChains() << std::endl; 85 //std::cout << "problem 75: " << e.UniquePerimeterRightAngledTriangles() << std::endl; 86 //std::cout << "problem 76: " << "(skipped)" << std::endl; //<< e.CountingSums() << std::endl; 87 //std::cout << "problem 77: " << e.PrimeSummations() << std::endl; 88 //std::cout << "problem 78: " << "(skipped)" << std::endl; //<< e.CoinPartitions() << std::endl; 89 //std::cout << "problem 79: " << e.PasscodeDerivation() << std::endl; //wrong 90 //std::cout << "problem 80: " << e.SquareRootDigitalExpansion() << std::endl; 91 //std::cout << "problem 86: " << e.CuboidRoute() << std::endl; 92 //std::cout << "problem 87: " << e.PrimePowerTriples() << std::endl; 93 //std::cout << "problem 90: " << e.CubeDigitPairs() << std::endl; //in progress 94 std::cout << "problem 93: " << e.ArithmeticExpressions() << std::endl; 95 //std::cout << "problem 94: " << e.AlmostEquilateralTriangles() << std::endl; //in progress 96 //std::cout << "problem 95: " << e.AmicableChains() << std::endl; 97 //std::cout << "problem 96: " << e.Sudoku() << std::endl; 98 //std::cout << "problem 98: " << e.AnagramicSquares() << std::endl; 99 //std::cout << "problem 100: " << e.ArrangedProbability() << std::endl; //in progress 100 101 std::cout << "duration: " << 1000.0 * (std::clock() - start) / CLOCKS_PER_SEC << "ms" << std::endl; 102 return 0; 103 }