d069. 格瑞哥里的煩惱 (t 行版)

解法一

✅ 完整代碼

評分結果(參考) : AC (2ms, 324KB)

#include<bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int t;
    cin >> t;

    int year;
    for(int i=0; i<t; i++){    
        cin >> year;

        if((year%4==0 && year%100!=0)||year%400==0) cout << "a leap year\n";
        else cout << "a normal year\n";
    }

    return 0;
}