#23650: 幫幫我line7您共輸出6行


0520ryanyu (余秉侖)

學校 : 國立科學工業園區實驗高級中學
編號 : 122637
來源 : [49.216.160.18]
最後登入時間 :
2024-10-21 14:46:13
d047. 10070 - Leap Year or Not Leap Year and ... -- UVa10070 | From: [60.251.194.164] | 發表日期 : 2020-12-05 21:20

#include<bits/stdc++.h>

using namespace std;

int main(){

int v;

while(cin>>v){

int n = 0;

if(v%4==0 and (v%100!=0 or v%400==0)){

cout << "This is leap year."<<'\n';

n = 1;

}

if(v % 15 == 0){

cout << "This is huluculu festival year."<<'\n';

 

n = 1;

}

if((v%4==0 and (v%100!=0 or v%400==0)) and v % 55 == 0){

cout << "This is bulukulu festival year."<<'\n';

 

n = 1;

}

 

if(n == 0){

cout << "This is an ordinary year."<<'\n';

}

cout << '\n';

n = 0;

}

}

line7WA

 

 
ZeroJudge Forum