The Problem: What is the 10 001st prime number? My Solution (in Python): Feedback is always appreciated!
The Problem: Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum. My solution (in Java): Straightforward problem. As always, I love feedback on how this solution could be improved!
The Problem: What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20 My Solution (in C++):
The Problem: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99. Find the largest palindrome made from the product of two 3-digit numbers. My solution (in C++): Comment if you know a way to think about this problem that leads to […]
The Problem: What is the largest prime factor of the number 600851475143 ? My solution (in C++): This may be faster if I pre-generate primes less than the input using the Sieve of Eratosthenes method, then dividing by those primes.
The problem: By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. My solution (in python):
The problem: Find the sum of all the multiples of 3 or 5 below 1000. My solution was just to use the principle of inclusion/exclusion. No code necessary.