sherlock and date
All submissions for this problem are available.
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
irst 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.
- 1 ≤ T ≤ 1000
Input: 3 23 July 1914 2 August 2000 5 November 1999 Output: 22 July 1914 1 August 2000 4 November 1999
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.5, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.