poj 1008
来源:互联网 发布:路由器访客网络连不上 编辑:程序博客网 时间:2024/04/28 23:23
#include <cstdio>#include<cstring>int main(){ int n,num,year,month,i,m; char cmonth[7],Haab[19][7]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol", "chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}, Tzolkin[20][9]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok", "chuen","eb","ben","ix","mem","cib","caban","eznab", "canac","ahau"}; scanf("%d",&n); printf("%d\n",n); //因为行号,wa了好几遍,无语 while(n--) { scanf("%d. %s %d",&num,&cmonth,&year); for(i=0;i<19;i++) { if(!strcmp(cmonth,Haab[i])) {month=i;break;} } m=year*365+i*20+num; //scanf("%d",&m); year=m/260;month=m%20;num=(m+1)%13; if((m+1)%13==0) //注意 { num=13; } printf("%d %s %d\n",num,Tzolkin[month],year); } return 0;}
我做的第一道模拟
- POJ-1008
- POJ 1008
- poj 1008
- poj 1008
- poj 1008
- poj 1008
- POJ 1008
- POJ-1008
- POJ 1008
- poj 1008
- POJ 1008
- POJ 1008
- Poj 1008
- poj 1008
- poj 1008
- poj 1008
- POJ-1008
- poj.1008
- AD TCL549
- 初学Android,跨进程调用Service(六十)
- [转]详细讲解提高数据库查询效率的实用方法、外键关于性能
- JNI的某些数组和字符串类型转换
- SQL2005语句实现行转列,列转行
- poj 1008
- [转]中国青岛发布新一代CPU桥片“星光青桥一号”
- 火狐 彻底 屏蔽 优酷视频 广告,直接跳过60秒,45秒,30秒等所有广告 非host方法
- IDM.UltraEdit.Portable.v18.20.0.1017.Incl.Keymaker-CORE
- 如何运行jar文件
- android拍照压缩及添加水印3
- Centos6.0下多个JDK安装部署
- LinkedHashMap和HashMap的比较使用
- 双指针不带头结点的链栈的实现(C语言)