What is the problem 19 of Project Euler?
Problem 19 of Project Euler is a curious little problem. It states You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. April, June and November. Which has twenty-eight, rain or shine. And on leap years, twenty-nine.
Which is the correct solution for Project Euler?
The correct solution to the original Project Euler problem was found in less than 0.01 seconds on an Intel® Core™ i7-2600K CPU @ 3.40GHz. See here for a comparison of all solutions.
When was the first Monday of the month in 1900?
You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. April, June and November. Which has twenty-eight, rain or shine. And on leap years, twenty-nine.
When was 1 Jan 1900 a leap year?
1 Jan 1900 was a Monday. April, June and November. Which has twenty-eight, rain or shine. And on leap years, twenty-nine. A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400. How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
When does a leap year occur in a century?
A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400. How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)? I thought a while about this, before I realised that the easiest way to solve this is most likely to exploit the .NET API.
Is the date 1 Jan 1900 a leap year?
1 Jan 1900 was a Monday. April, June and November. Which has twenty-eight, rain or shine. And on leap years, twenty-nine. A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.
Is there a way to count all Sundays?
As we know 1st Jan 1900 was a Monday and as we go sequentially through the dates, we can keep track of the day of week ourselves and just count the occurences of sundays. We also know that Februray is a problematic month, as it has leap years under the given condition.