top of page

Problem 19
This is a C++ solution to Project Euler problem 19 found at: https://projecteuler.net/problem=19
My Algorithm
For this problem, we are asked to find the amount of Sundays that land on the first day of the month during the twentieth century. To do this, we first implement a formula for finding the amount of days found between a given year and 1901. Then, we can simply loop through every month/year combination and check whether the first day of that combination is a Sunday. If it is, we add it to a running sum of the amount of Sundays. Once we have looped through all combinations, we can return the final answer of 171.
Full Solution on GitHub
bottom of page