Question
You are given two values, c and n. c is the current day of the week - 0 is Sunday, 1 is Monday, 2 is
You are given two values, c and n. c is the current day of the week - 0 is Sunday, 1 is Monday, 2 is Tuesday, etc. n is the number of days that have elapsed since day c. Print out what day that will be.
Input Format
both c and n will be integers
Constraints
0 <= c <= 6 -2 billion <= n <= 2 billion
Output Format
Output the full name of the day of the week.
Sample Input 0
3 2
Sample Output 0
Friday
Explanation 0
Day 3 is Wednesday. 2 days after Wednesday is Friday
Sample Input 1
4 -1
Sample Output 1
Wednesday
Explanation 1
Day 4 is Thursday. 1 day before Thursday (previous day) is Wednesday. A negative value for n indicates we are looking for previous days.
Screenshot of the output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started