Sherlock and Date
Practice
3.8 (48 votes)
Approved
Basic programming
Easy
Implementation
Open
Problem
87% Success 19913 Attempts 20 Points 2s Time Limit 256MB Memory 1024 KB Max Code

Watson gives a date to Sherlock and asks him what is the date on the previous day. Help Sherlock. You are given date in DD MM YYYY format. DD is an integer without leading zeroes. MM is one of the "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November" and "December" (all quotes for clarity). YYYY is also an integer between 1600 and 2000 without leading zeroes. You have to print the date of the previous day in same format.

Input and Output
First line, T (≤ 100), the number of testcases. Each testcase consists of date in specified format. For each testcase, print the required answer in one line. Given date will be a valid date.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
9 votes
Tags:
EasyMath
Points:20
29 votes
Tags:
Basic ProgrammingBasics of ImplementationEasyImplementation
Points:20
6 votes
Tags:
Basic ProgrammingBasics of ImplementationEasyImplementation