POJ 1008 Maya Calendar
来源:互联网 发布:行而知天下 编辑:程序博客网 时间:2024/06/06 00:13
This problem is not very hard, just calm your head and pick up your pen, make the relationship of two kinds of calendar.
There are 365 days a year in Haab calendar, 260 days a year in Tzolkin calendar. First, just sum up the total number of days with Haab calendar, it's easy. Second, while the month and the day name of Tzolkin change in circle together, what we should do is mod 13 to get month and mod 20 to get day name. That's all.
THERE IS ONLY ONE THING TO TAKE CARE: While total number of days exactly 260*X, we should decrease year number, for example:
Haab: 19. mac 0
Tzolink: 13 ahau 0 rather than 13 ahau 1.
THX for your reading, there is no Chinese typer, so just ignore my poor English.
Code is under the The comments section.
- POJ 1008 Maya Calendar
- poj 1008 Maya Calendar
- POJ 1008 Maya Calendar
- POJ 1008 Maya Calendar
- 【POJ】1008 Maya Calendar
- POJ-1008:Maya Calendar
- POJ 1008 Maya Calendar
- poj 1008 Maya Calendar
- POJ-1008-Maya Calendar
- POJ-1008-Maya Calendar
- POJ 1008/Maya Calendar
- poj 1008 Maya Calendar
- poj 1008 Maya Calendar
- [POJ][1008]Maya Calendar
- POJ 1008 Maya Calendar
- POJ - 1008 Maya Calendar
- POJ 1008 Maya Calendar
- POJ 1008 Maya Calendar
- 将图片文件流转换成base64字符串
- 2012年5月SAT香港真题解析
- GRE写作必备句型
- sublime text2 插件 zencoding的安装及使用
- 日志管理--log4j
- POJ 1008 Maya Calendar
- backtrace&&backtrace_symbols 查找段错误 打印堆栈信息
- Aladdin and the Flying Carpet
- HDU 2032 杨辉三角
- C++ 调用字体框和调色板的代码
- Universal-Image-Loader,android-Volley,Picasso、Fresco和Glide五大Android开源组件加载网络图片的优缺点比较
- COPY 深入理解Java内存模型
- gem source更改为淘宝,bundle install时报错,如何解决?
- POJ 3273 Monthly Expense