#45412: C++解法


antony20070702@gmail.com (antony_0702)

學校 : 高雄市立高雄高級中學
編號 : 255700
來源 : [114.40.7.122]
最後登入時間 :
2025-03-08 20:37:19
a004. 文文的求婚 | From: [114.40.32.192] | 發表日期 : 2025-02-27 02:06

#include <iostream>
#include <cmath>
using namespace std;
int main(){
    int i;
    while(cin >> i){
        if(i%4==0&&i%100!=0||i%400==0){
            cout << "閏年" << endl;
        }
        else{
            cout << "平年" << endl;
        }
    }
}

 
ZeroJudge Forum