Skip to content

cpratim/Project-Euler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

126 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 [70%]: Chef Showdown

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

About

Collection of solved Project Euler problems in C++ / Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors