Solutions to the maths problems, inspired by Project Euler.
Each problem has associated tests that will be run on executing the script, and takes less than a minute to complete.
Problems are solved either using Python or F# (using a functional approach).
These are solutions based on archived problems that have been solved countless times.
Note that sharing code based on the current problems is against the competition rules, so if you try these yourself be mindful of this.
Favourite problems are highlighted
- Find the sum of the multiples of 3 of 5 below N
- Find the sum of the even Fibonacci numbers below N
- Find the largest prime factor of a large number
- Find the largest palindrome made from the product of two N-digit numbers
- Find the smallest positive number that is evenly divisible by all of the numbers from 1 to N
- Find the difference between the sum of squares and the square of the sum of N natural numbers
- Find the Nth prime
- Find largest product of adjacent digits in sequence
- Find Pythagorean triplets which sum to a given number
- Find sum of all primes below N
- Find greatest product in grid
- Find highly divisible triangle numbers
- Find first digits of a sum of large numbers
- Find longest Collatz sequence below N
- Find the number of lattice paths through grid of given dimensions
- Find sum of digits of extremely large number
- Convert numbers to words
- Find maximum path sum through triangle
- How many Sundays fell on the first of the month during the 20th century?
- Find sum of digits of large factorial
- Find sum of amicable numbers below N
- Find scores of list of names
- Find sum of all positive integers that cannot be written as the sum of two abundant numbers
- Find nth lexicographic permutations of number range
- Find first Fibonacci number with N digits
- Sum of numbers written as fifth power of digits
- Find the nth digit of Champernowne's constant
- Common triangular, pentagonal and hexagonal numbers