W.C 1.1 Which Day?

Rahul loves calendars and dates.
Rahul and Priya are playing a game.Rahul gives Priya a date and Priya has to find which day of the week was on that date.

Assumption :
1/01/0001 was Monday
Every month has 31 days
Every year has 365 days

Days of Week : Monday Tuesday Wednesday Thursday Friday Saturday Sunday.

Input Format :
Date is given in "dd/mm/yyyy........" format
Date >= '01/01/0001'

Output :
Submit the output as sum of outputs of all test cases.
Monday = 0,Tuesday = 1..........Saturday = 5,Sunday = 6

Example testcase:
Date : 31/02/0001
Day : Saturday(5)

Explanation :
Since 01/01/0001 is Monday, 08/01 should be monday.
Similarly 15/01, 22/01, 29/01, 05/02, 12/02, 19/02, 26/02 are mondays
Since 26/02/0001 is Monday 31/02/0001 should be Saturday(5)

Testcases : link

This challenge is worth 60 points.

You must be logged in to submit a solution

View ranklist for this challenge
About scoring and submission

Contact Us


Kunal Desai : 7715051136

Neelraj Patil : 9930671144



Privacy Policy