『杭电1463』Anniversaries

Problem Description

As far as our perceptions are concerned, a year runs from the midnight beginning the first of January to the midnight ending the 31st of December. Thus we can say that a year consists of:
12 months (of differing lengths)
52 (and a bit) weeks
365 days
8,760 hours
525,600 minutes
31,536,000 seconds.
Most of these numbers need to be adjusted in leap years.

A k'th anniversary of a date is usually defined as the same date (month and day) k years later, thus the 10th anniversary of 17th May 1983 is 17th May 1993. However we can also define other types of `versaries' - the 1 week-versary of 28th February 1984 is 6th March 1984.

If we define a convention of naming dates (and times if necessary) by specifying successively smaller periods separated by colons (that is as yyyy:mm:dd:hh:mm:ss) we can label the units using the same convention, that is y

你可能感兴趣的:(#,杭电题库,c++,算法)