题解 | 判断闰年
判断闰年
https://www.nowcoder.com/practice/a7bcbe3cb86f435d9617dfdd20a16714?tpId=383&tqId=285087&sourceUrl=%2Fexam%2Foj%3FquestionJobId%3D10%26subTabName%3Donline_coding_page
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
if (n % 400 == 0) {
cout << "yes";
} else if (n % 4 == 0) {
if (n % 100 != 0) {
cout << "yes";
} else {
cout << "no";
}
} else {
cout << "no";
}
return 0;
}
SHEIN希音公司福利 370人发布