Problem #98 concerns searching for anagrams in a list of words. The question reads: Project Euler Problem 98: Anagramic squares By replacing each of the letters in the word CARE with 1, 2, 9, and 6 respectively, we form a square number: 1296 = 362. What is remarkable is that, by using the same digital …
Tag Archives: Coding
Project Euler Problem #97
Problem #97 concerns finding the last ten digits of a large Mersenne Prime. The question reads: Project Euler Problem 97: Large non-Mersenne prime The first known prime found to exceed one million digits was discovered in 1999, and is a Mersenne prime of the form 26972593−1; it contains exactly 2,098,960 digits. Subsequently other Mersenne primes, …
Project Euler Problem #96
Problem #96 concerns solving Sudoku grids. The question reads: I must confess, this is one of the problems where I’m not really sure why my solution is as efficient as it is. It took me a lot of troubleshooting to find a solution which could solve all of the grids in a reasonable amount of …
Project Euler Problem #95
Problem #95 concerns chains formed by repeatedly replacing a number with the sum of its proper factors. The question reads: Project Euler Problem 95: Amicable chains The proper divisors of a number are all the divisors excluding the number itself. For example, the proper divisors of 28 are 1, 2, 4, 7, and 14. As …
Project Euler Problem #94
Problem #94 concerns triangles that are nearly equilateral and have integer area. The question reads: Project Euler Problem 94: Almost equilateral triangles It is easily proved that no equilateral triangle exists with integral length sides and integral area. However, the almost equilateral triangle 5-5-6 has an area of 12 square units. We shall define an almost equilateral triangle to …
Project Euler Problem #93
Problem #93 concerns the values that can be obtained by evaluating arithmetic expressions with specific sets of digits. The question reads: Project Euler Problem 93: Arithmetic expressions By using each of the digits from the set, {1, 2, 3, 4}, exactly once, and making use of the four arithmetic operations (+, −, *, /) and …
Project Euler Problem #92
Problem #92 concerns the results when numbers are repeatedly replaced by the square of their digits. The question reads: Project Euler Problem 92: Square digit chains A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before. For example, …
Project Euler Problem #91
Problem #91 concerns right triangles whose vertices lie on lattice points. The question reads: My solution for this problem involves a bit of brute force. Here’s my solution: Solution #1: Brute Force Casework Approach We have several cases to consider. The first is if the right angle is either at the origin or on one …
Project Euler Problem #90
Problem #90 concerns pairs of dice that can be rearranged to form all of the 2-digit square numbers. The question reads: My solution for this problem is very brute force-heavy, so I may come back to this problem to look for a more efficient solution. Here is my solution: Solution #1: Brute Force Approach We …
Project Euler Problem #89
Problem #89 concerns the number of characters in Roman numerals. The question reads: Project Euler Problem 89: Roman numerals For a number written in Roman numerals to be considered valid there are basic rules which must be followed. Even though the rules allow some numbers to be expressed in more than one way there is …