FunctionRacerProblemsRace

Day of the Week

MediumMathPython, JavaScript, TypeScript, Java, C++

Return the name of the weekday of the given date, as one of "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday". Known anchor: January 1, 2000 was a Saturday.

Example 1

day 31
month 8
year 2019
returns "Saturday"

A Saturday.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Math problems