18. Day of Week

Difficulty: 

For a given date in the 1900s century (19XX years), calculate which day of week it was. Information you may need:

Please do not use built-in date functions, and avoid pre-computing anything in your solution.

(disclaimer: any historically-significant date in the test data is accidental)

Input:

dayOfWeek(1900, 3, 2);

Output:

"FRIDAY"

Time Limit:

1000 (ms)

Hint (hover to see):

  • Hint #1



Results

ProblemsAcceptedWrongTimed OutError
170000

Input:

Expected Output:

Output: