SP13405 APCER - MayanCalendar
Description
Problem Statement:
The Maya is a Mesoamerican civilization noted for its art, architecture, mathematics and astronomical systems. In the recent past their calendar system has been quite in the news because of the misinterpretation of their Long count calendar, which gave way for a popular belief that a cataclysm will take place on December 21, 2012. Many speculated it will mark the end of human civilization!
But we now know it did not happen as we are still alive! Note this date, it falls on a Friday.Since human civilization may have ended on that day, we will call every Friday the 21st as a _vulnerable_ day. Similarly we define a _safe_ day which is not a vulnerable day. Your task is given two years M and N, you need to find how many safe days are there between any given years M and N (inclusive).
To honor the Mayan civilization you should write the total number of safe days in Mayan Long Count notation. The Long Count calendar identifies a date by counting the number of days from the Mayan creation date. But instead of using a base-10 scheme like Western numbering, the Long Count days were tallied in a modified base-20 scheme. As a matter of fact December 21, 2012 is simply the day that the calendar will go to the next B'ak'tun. You do not need to bother about creation date but simply represent your answer in Long Count notation. See the below example and table for clarification:
**Days**
**Place**
**Long Count unit**
1
0
1 K'in
20
1
**1 Winal**
360
2
1 Tun
7,200
3
1 K'atun
144,000
4
1 B'ak'tun
**Table of Long Count units**
Check the full list here: [http://en.wikipedia.org/wiki/Maya\_calendar](http://en.wikipedia.org/wiki/Maya_calendar) (not needed for this problem).
**Conversion**:
For this problem you can consider numbers in the Long Count to be represented in base 20 except for the **Winal** place which is to be taken in base 18. Below example will clarify how to convert your answer into Long Count Notation.
For instance, if safe days comes out to be 1454 your output must be: "0.0.4.0.14" (without quotes). (1\*14 + 20\*0 + 360\*4 + 7200\*0 + 144000\*0 = 1454)
For 360 output must be "0.0.1.0.0"(without quotes).
For 20 output must be “0.0.0.1.0” (without quotes).
As you can see all the places are in base 10 except the 1 $ ^{st} $ place which is base 18.
**Input Specification**: First line of input contains 0
Input Format
N/A
Output Format
N/A