Closed tepen closed 10 years ago
This one seems fairly easy as well. I think it's either this one or the Roman Numbers
Played with this one for a bit, I can't figure out what it is they are using as the zero date. if 2012, 12, 21 is 13 baktun
Can't you figure out from this: " As an example, '12.17.16.7.5' means 12 baktun, 17 katun, 16 tun, 7 uinal, and 5 kin. This is also the date that corresponds to January 1st, 1970. "?
Also, why do you need the zero?
Ah! didn't see the date for epoch! that makes a difference!
[MEDIUM] Mayan long count - convert a date from the Gregorian calender to the Mayan Calendar.
A line should be input that contains a day, a month, and a year (in that order) separated by a single space. The output should be in the pattern..... Remember to handler leap years! (To make it simpler, though, you can write it to only accept dates since 1 January 1970.
Explanation of the Mayan calendar: The Maya name for a day was k'in. Twenty of these k'ins are known as a winal or uinal. Eighteen winals make one tun. Twenty tuns are known as a k'atun. Twenty k'atuns make a b'ak'tun.. Essentially, we have this pattern: 1 kin = 1 day 1 uinal = 20 kin 1 tun = 18 uinal 1 katun = 20 tun 1 baktun = 20 katun
The long count date format follows the number of each type, from longest-to-shortest time measurement, separated by dots. As an example, '12.17.16.7.5' means 12 baktun, 17 katun, 16 tun, 7 uinal, and 5 kin. This is also the date that corresponds to January 1st, 1970. Another example would be December 21st, 2012: '13.0.0.0.0'. This date is completely valid, though shown here as an example of a "roll-over" date. Example input: 20 7 1988 Example output: 12.18.15.4.0