提交时间:2024-02-25 11:50:53

运行 ID: 42335

#include<bits/stdc++.h> using namespace std; int x,y; int mo[24]={1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12}; int d[24]={5,20,4,19,5,20,4,19,5,20,5,21,6,22,7,22,7,22,8,23,7,22,7,21}; string j[24]={"XH","DH","LC","YS","JZ","CF","QM","GY","LX","XM","MZ","XZ","XS","DX","LQ", "CS","BL","QF","HL","SJ","LD","XX","DX","DZ"}; int main(){ cin>>x>>y; for(int i=0;i<24;i++){ if(mo[i]==x&&d[i]==y){ cout<<j[i]; return 0; } } for(int i=0;i<24;i++){ if(x==12&&y>d[23]){ cout<<j[0]; return 0; }else if(x>mo[i]){ continue; }else if(x==mo[i]&&y<d[i]||x<mo[i]){ cout<<j[i]; return 0; } } return 0; }