#12333: 正確答案


st990185@gmail.com (風神)

學校 : 臺北市立東湖國中
編號 : 67139
來源 : [220.136.196.36]
最後登入時間 :
2017-07-03 18:12:43
d047. 10070 - Leap Year or Not Leap Year and ... -- UVa10070 | From: [118.168.69.55] | 發表日期 : 2017-07-07 12:24

#include <iostream>
using namespace std;
int main()
{
long long int year;
while(cin >> year)
{

if(year%4==0 && year%100!=0 || year%400==0)
{
cout << "This is leap year.\n";
if(year%55==0)
cout << "This is buluculu festival year.\n";
if(year%15==0)
cout << "This is huluculu festival year.\n";

}
else
{
int y=0;
if(year%55==0){
cout << "This is huluculu festival year.\n";
y=1;}
if(year%15==0){
cout << "This is huluculu festival year.\n";
y=1;}
if(y==0)
cout << "This is an ordinary year.\n";
}
cout << endl;
}

return 0;
}

 
ZeroJudge Forum