Submit | All submissions | Best solutions | Back to list |
NXTDAY - DAY AND DATE |
Given a date. Print the next date and the corresponding day separated by a space.
Input
The first line of input contain t (number of test cases).
Next t lines contain dates in the following format : Day/Month/Year
If the date is a invalid date then print "Invalid Date" (without quotes).
Output
Each line of output contains the next date and the corresponding day separated by a space.
The output format is same as that of input format.
The day must be written in lowercase letters as:
- sunday
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
Example
Input: 5 12/11/2012 1/2/2011 27/2/1995 30/11/2014 33/5/1990 Output: 13/11/2012 tuesday 2/2/2011 wednesday 28/2/1995 tuesday 1/12/2014 monday Invalid Date
Constraints
1 <= t <= 200000
1 <= Day <= 50
1 <= Month <= 50
1900 <= Year <= 4000
All solutions have been rejudged. Sorry for the inconvenience caused.
Added by: | ivar.raknahs |
Date: | 2014-12-08 |
Time limit: | 1s-1.5s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own problem |
hide comments
2017-04-05 20:16:59 Chetanya Kandhari
what could be the edge cases if my code is working for the sample test case? |