Friday the 13th Count
Return how many months of the given year have a 13th that falls on a Friday. Use the Gregorian calendar. Known anchor: January 1, 2000 was a Saturday.
Example 1
year 2015
returns 3
February, March and November 2015.
Constraints
1900 <= year <= 2100
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More Math problems
- Last Digit of a PowerMedium
- Last Person StandingMedium
- Minimum Moves to Equal ElementsMedium
- Multiply StringsMedium
- Power ModMedium
- Trailing Zeroes in FactorialMedium
- Twin PrimesMedium
- Valid SquareMedium