#include<bits/stdc++.h>
using namespace std;
int main()
{
string an;
int j = 0;
while(cin >> an)
{
if(j > 0)
cout << endl;
int lp400, lp4, lp100, h15, b55, f, n;
lp400 = lp4 = lp100 = h15 = b55 = f = n =0;
int l = an.size(), i;
for(i=0;i<l;i++)
{
lp400 = ((lp400 * 10) + (an[i] - '0'))%400;
lp4 = ((lp4*10) + (an[i] - '0'))%4;
lp100 = ((lp100*10) + (an[i] - '0'))%100;
h15 = ((h15*10)+ (an[i] - '0'))%15;
b55 = ((b55*10) + (an[i] - '0'))%55;
}
if(lp400 == 0 || (lp4 == 0 && lp100 != 0))
{
cout << "This is leap year." << endl;
f = 1;
n = 1;
}
if(h15 == 0)
{
cout << "This is huluculu festival year." << endl;
n = 1;
}
if(b55 == 0 && f == 1)
{
cout << "This is bulukulu festival year." << endl;
n = 1;
}
if(n != 1)
cout << "This is an ordinary year." << endl;
j++;
}
return 0;
}
using namespace std;
int main()
{
string an;
int j = 0;
while(cin >> an)
{
if(j > 0)
cout << endl;
int lp400, lp4, lp100, h15, b55, f, n;
lp400 = lp4 = lp100 = h15 = b55 = f = n =0;
int l = an.size(), i;
for(i=0;i<l;i++)
{
lp400 = ((lp400 * 10) + (an[i] - '0'))%400;
lp4 = ((lp4*10) + (an[i] - '0'))%4;
lp100 = ((lp100*10) + (an[i] - '0'))%100;
h15 = ((h15*10)+ (an[i] - '0'))%15;
b55 = ((b55*10) + (an[i] - '0'))%55;
}
if(lp400 == 0 || (lp4 == 0 && lp100 != 0))
{
cout << "This is leap year." << endl;
f = 1;
n = 1;
}
if(h15 == 0)
{
cout << "This is huluculu festival year." << endl;
n = 1;
}
if(b55 == 0 && f == 1)
{
cout << "This is bulukulu festival year." << endl;
n = 1;
}
if(n != 1)
cout << "This is an ordinary year." << endl;
j++;
}
return 0;
}
Comments
Post a Comment