poj 1008
来源:互联网 发布:苹果cms采集插件教程 编辑:程序博客网 时间:2024/06/02 06:40
之前一度蠢到把19当18算,挺简单的题就不多说了
#include <stdio.h>#include <string.h>int main(){ int num; char b[19][9]={"pop", "no", "zip","zotz","tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; char a[20][9]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb","ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"}; scanf("%d",&num); printf("%d\n",num); while(num--) { long long day,year,month,day1,year1,month1; long long sum; char m[10]={""}; int i; scanf("%lld. %s%lld",&day,m,&year); for(i=0;i<19;i++) { if(strcmp(m,b[i])==0) {month=i;break;} } sum=year*365+month*20+day; year1=sum/260; month1=sum%20; day1=sum%13+1; printf("%lld %s %lld\n",day1,a[month1],year1); } return 0;}
0 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
- 安卓 Hacking Part 17 破解Android应用
- Openstack零基础开发视频教程
- 欢迎使用CSDN-markdown编辑器
- 1046. Shortest Distance
- JavaStuNote 5
- poj 1008
- 【MVC框架】——什么是MVC框架
- 黑马程序员—JAVA基础—String类 javaAPI学习
- Android开发:ZXing条码扫描-竖屏解决方案
- java中的File.separator
- php 发邮件 带附件 html
- Spinner与适配器模式总结
- SPI,UART,I2C都有什么区别,及其各自的特点
- 用Tomcat和Eclipse开发Servlet程序(转)