Problem: convert a date to a new format called Doors.
Solution: count the number of days from 0001-01-01, subtract to 1998-06-24, and then divide by 365 and count the number of leap years. The period, month, week and day can be determined then.
Note: the 4th year is leap, but the 1bd year is not in the example output. Therefore, assuming 4bd is leap and so on. I also found a typo in the string literal, which takes quite a while.
No comments:
Post a Comment