#include<bits/stdc++.h>
#define i64 long long
#define mx(a,b,c) max(a,max(b,c))
#define mn(a,b,c) min(a,min(b,c))
#define eef else if
#define ff(i,s,e) for(int i=(s); i<e; i++)
#define ff2(i,s,e) for(int i=(s); i>=e; i--)
#define sf scanf
#define pf printf
#define dbug(x) cout<<"x = "<<x<<endl
#define newl() cout<<"\n"
using namespace std;
int main()
{
int cse=0,cnt=0,flg=0,leap=0;
string year;
while(cin>>year){
int m4=0,m15=0,m100=0,m55=0,m400=0;
if(cnt!=0)
newl();
cnt=1;
ff(i,0,year.size()){
m4=((m4*10)+(year[i]-'0'))%4;
m15=((m15*10)+(year[i]-'0'))%15;
m100=((m100*10)+(year[i]-'0'))%100;
m55=((m55*10)+(year[i]-'0'))%55;
m400=((m400*10)+(year[i]-'0'))%400;
}
if((m4==0 && m100!=0)||m400==0){
cout<<"This is leap year.\n";
flg=1;
leap=1;
}
if(m15==0){
cout<<"This is huluculu festival year.\n";
flg=1;
}
if(leap==1 && m55==0)
cout<<"This is bulukulu festival year.\n";
if(flg==0)
cout<<"This is an ordinary year.\n";
flg=0;
leap=0;
}
return 0;
}
#define i64 long long
#define mx(a,b,c) max(a,max(b,c))
#define mn(a,b,c) min(a,min(b,c))
#define eef else if
#define ff(i,s,e) for(int i=(s); i<e; i++)
#define ff2(i,s,e) for(int i=(s); i>=e; i--)
#define sf scanf
#define pf printf
#define dbug(x) cout<<"x = "<<x<<endl
#define newl() cout<<"\n"
using namespace std;
int main()
{
int cse=0,cnt=0,flg=0,leap=0;
string year;
while(cin>>year){
int m4=0,m15=0,m100=0,m55=0,m400=0;
if(cnt!=0)
newl();
cnt=1;
ff(i,0,year.size()){
m4=((m4*10)+(year[i]-'0'))%4;
m15=((m15*10)+(year[i]-'0'))%15;
m100=((m100*10)+(year[i]-'0'))%100;
m55=((m55*10)+(year[i]-'0'))%55;
m400=((m400*10)+(year[i]-'0'))%400;
}
if((m4==0 && m100!=0)||m400==0){
cout<<"This is leap year.\n";
flg=1;
leap=1;
}
if(m15==0){
cout<<"This is huluculu festival year.\n";
flg=1;
}
if(leap==1 && m55==0)
cout<<"This is bulukulu festival year.\n";
if(flg==0)
cout<<"This is an ordinary year.\n";
flg=0;
leap=0;
}
return 0;
}
No comments:
Post a Comment