Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

121 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project-Euler

Collection of solved Project Euler problems in C++ (https://projecteuler.net/).

Contributors:

The intent of this collection is not to provide answers to the problems. It solely intends to showcase solution techniques for educational value.

How to use

Run and execute with following command:

curl -O https://raw.githubusercontent.com/cpratim/Project-Euler/main/euler.sh \
&& chmod +x euler.sh \
&& ./euler.sh

Highest difficulty solved [60%]: Flea Circus

Problem Number Difficulty Runtime (us) Code
Multiples of 3 or 5 1 5% ~ 100 problem1.h
Even Fibonacci numbers 2 5% ~ 1 problem2.h
Largest prime factor 3 5% ~ 1 problem3.h
Largest palindrome product 4 5% ~ 8000 problem4.h
Smallest multiple 5 5% ~ 1 problem5.h
Sum square difference 6 5% ~ 1 problem6.h
Largest product in a series 8 5% ~ 10 problem8.h
1000-digit Fibonacci number 25 5% ~ 1 problem25.h
Cubic permutations 62 15% ~ 20000 problem62.h
Totient maximum 69 10% ~ 10 problem71.h
Ordered fractions 71 10% ~ 6000 problem71.h
Counting fractions in a range 73 15% ~ 60e5 problem73.h
Counting summations 76 10% ~ 80 problem76.h
Path sum: four ways 83 25% ~ 30000 problem83.h
Roman numerals 89 20% ~ 10000 problem89.h
Cube digit pairs 90 40% ~ 10000 problem90.h
Almost equilateral triangles 94 35% ~ 1 problem94.h
Amicable chains 95 30% ~ 10e5 problem95.h
Anagramic squares 98 35% ~ 600000 problem98.h
Largest exponential 99 10% ~ 500 problem99.h
Arranged probability 100 30% ~ 100 problem101.h
Optimum polynomial 101 35% ~ 200000 problem101.h
Triangle containment 102 15% ~ 4000 problem102.h
Special subset sums: testing 105 45% ~ 10000 problem105.h
Minimal network 107 35% ~ 20000 problem107.h
Diophantine reciprocals I 108 30% ~ 20e5 problem108.h
Primes with runs 111 45% ~ 30000 problem111.h
Non-bouncy numbers 113 30% ~ 200 problem113.h
Counting block combinations I 114 35% ~ 30 problem114.h
Counting block combinations II 115 35% ~ 6000 problem115.h
Red, green or blue tiles 116 30% ~ 10 problem116.h
Red, green, and blue tiles 117 35% ~ 10 problem117.h
Pandigital prime sets 118 45% ~ 30e5 problem118.h
Digit power sum 119 30% ~ 250 problem119.h
Disc game prize fund 121 35% ~ 2000 problem121.h
Efficient exponentiation 122 40% ~ 300000 problem122.h
Perfect Square Collection 142 45% ~ 200000 problem142.h
Searching a triangular array for a sub-triangle having minimum-sum 150 55% ~ 500000 problem150.h
Paper sheets of standard sizes: an expected-value problem 151 50% ~ 30000 problem151.h
Numbers for which no three consecutive digits have a sum greater than a given value 164 45% ~ 300 problem164.h
Investigating numbers with few repeated digits 172 55% ~ 10e5 problem172.h
Using up to one million tiles how many different "hollow" square laminae can be formed? 173 30% ~ 6000 problem173.h
Step Numbers 178 55% ~ 8000 problem178.h
Semiprimes 187 25% ~ 30e5 problem187.h
The hyperexponentiation of a number 188 35% ~ 10e7 problem188.h
Maximising a weighted product 190 50% ~ 1 problem190.h
Prize Strings 191 35% ~ 100 problem191.h
Investigating the behaviour of a recursively defined sequence 197 45% ~ 1000 problem197.h
Generalised Hamming Numbers 204 30% ~ 20e5 problem204.h
Dice Game 205 15% ~ 3000 problem205.h
Flea Circus 213 60% ~ 800000 problem213.h
Binary Circles 265 40% ~ 150000 problem265.h
Prime Frog 329 25% ~ 2000 problem329.h
Empty chairs 469 40% ~ 200 problem469.h

About

Collection of solved Project Euler problems in C++

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages