poj1008
来源:互联网 发布:非农数据大于预期 编辑:程序博客网 时间:2024/05/19 12:16
#include<iostream>#include<fstream>using namespace std;int main(){ //ifstream cin("2.txt"); int n; cin>>n; cout<<n<<endl; string months[]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; string days[]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"}; for(int i0=0;i0<n;++i0){ string day; cin>>day; int d=0; for(int i=0;i<day.length()-1;++i){ d=d*10+(day[i]-'0'); } string month; cin>>month; int m=0; for(int i=0;i<19;++i) if(month==months[i]){ m=i+1; break; } int y; cin>>y; int total=d+1+(m-1)*20+y*365; //cout<<total<<endl; int y2=total/260; total%=260; int m2; string day2; if(total==0){ y2-=1; m2=13; day2="ahau"; }else{ m2=total%13; if(m2==0) m2=13; total-=1; day2=days[total%20]; } cout<<m2<<" "<<day2<<" "<<y2<<endl; } return 0;}
0 0
- poj1008
- POJ1008
- POJ1008
- poj1008
- POJ1008
- poj1008
- poj1008
- poj1008
- poj1008
- POJ1008
- POJ1008
- poj1008
- poj1008
- poj1008
- POJ1008
- poj1008
- POJ1008
- poj1008
- ZOJ-1088
- 黑程序员_Java基础加强(中)_JavaBean,注解,泛型_27
- poj 3616 Milking Time DP
- 你的人生是在挑水还是在挖井
- 用Matlab来将分层制造过程中G代码所表示的单层的加工路径显示出来
- poj1008
- android 游戏模拟器源码大全。
- jsp读取properties文件
- poj1046
- 代码审查(code review)的意义
- 希望whatsapp的收购能够引入一种新的商业模式
- HDU 1203 I NEED A OFFER! (dp+概率)
- 最近点计算
- JFreeChar生成柱状图