It's the new year already, but the festive spirit of Christmas still lingers in you. In fact, you've decided to make a parody of the traditional Christmas carol "The 12 Days of Christmas" and call it "The Days of Christmas". Now you can celebrate Christmas all year round!
Of course, having so many days means that the lyrics will be ridiculously long. After coming up with what your true love sends to you each day, you realized that the sane thing to do is to write a program to output the lyrics of the entire song.
Input Specification
The first line of input will contain , the number of days.
The line will contain what your true love sent to you on the day. Each line will contain no more than characters. Plurals will be included in the input.
Output Specification
Output the lyrics to your parody. See the sample case for details.
Sample Input
4
partridge in a pear tree
turtle doves
french hens
calling birds
Sample Output
On the 1st day of Christmas my true love sent to me:
1 partridge in a pear tree
On the 2nd day of Christmas my true love sent to me:
2 turtle doves
and 1 partridge in a pear tree
On the 3rd day of Christmas my true love sent to me:
3 french hens
2 turtle doves
and 1 partridge in a pear tree
On the 4th day of Christmas my true love sent to me:
4 calling birds
3 french hens
2 turtle doves
and 1 partridge in a pear tree
Explanation for Sample Output
The sample case is a shortened version of the traditional song. Note that:
- the suffix for numbers ending in 1, 2, and 3, excluding numbers ending in 11, 12, and 13, are
st
,nd
, andrd
, respectively, all other numbers taketh
- there is an empty line between every verse
- after the first day, the last item in the list is preceded with
and
Make sure to follow the format, capitalization, and punctuation exactly.
Comments
I seem to have taken into account the corner cases and yet I am still getting partial marks. Can someone please give me a hint at what I may be doing wrong. Thanks.
111st
Thank you very much!
I get "You submitted too many submissions." whenever I attempt this problem.
(I've made 2 submissions. Maybe it is a typo, and should say "two many submissions".)
Edit: Seems to have been resolved. Thanks!
Is it the 12nd day of Christmas or the 12th?
Edit: Now I see. Curse the English language for being so convoluted.
Edit: Don't you love it when the only way to get full points is to change some random thing about your code and you have no idea why it worked but it did.
The answer to your question is in the problem statement.