int main(){ int cCase = 0; char name[5]; while(scanf("%s", name), name[0]!='0'){ printf("Case %d:", ++cCase); memset(nId, 0, sizeof(nId)); nId[name2id(name)]++; for(int i = 1; i<13; i++){ scanf("%s", name); nId[name2id(name)]++; } bool ready = 0; for(int i = 0; i<34; i++) if((nId[i] || (i-1 && nId[i-1]) || (i+1<34 && nId[i+1]))&&nId[i]<4){ nId[i]++; if(hu()){ printf(" %s", id2name[i]); ready = 1; } nId[i]--; } if(!ready) printf(" Not ready"); printf("\n"); } return 0; }
main() { char s[100000] ; bool fir=1 ; while(scanf("%s",s)!=EOF) { if(fir) fir=0 ; else printf("\n") ; int l=strlen(s) ; int n=1000*(s[l-4]-'0')+100*(s[l-3]-'0')+10*(s[l-2]-'0')+(s[l-1]-'0') ; int x=an(n),y=hu(s,l),z=(bu(s,l))&&(an(n)) ; if((!x) && (!y) && (!z)) printf("This is an ordinary year.\n") ; else { if(x) printf("This is leap year.\n") ; if(y) printf("This is huluculu festival year.\n") ; if(z) printf("This is bulukulu festival year.\n") ; } } }