- #include<bits/stdc++.h>
- using namespace std;
- char a;
- string str[]={"摩羯座","水瓶座","雙魚座","牡羊座","金牛座","雙子座","巨蟹座","獅子座","處女座","天秤座","天蠍座","射手座","摩羯座"};
- int m,d,b[]={0,21,20,21,21,22,22,23,22,24,24,23,23};
- int main()
- {
- cin.tie(0);
- cin.sync_with_stdio(0);
- while(cin>>m>>a>>d)
- {
- if(d>=b[m])
- {
- cout<<str[m]<<endl;
- }else
- {
- cout<<str[m-1]<<endl;
- }
- }
- return 0;
- }
複製代碼 |