第二章暴力求解
例2.6(闰年问题)
题目链接:链接
//四年一闰,百年不闰,四百年再闰
#include <bits/stdc++.h>
using namespace std;
bool is_leapyear(int n){
if((n%4==0&&n%100!=0)||(n%400 == 0)){
return true;
}
return false;
}
int main(){
int year,month,day;
in
原创
2020-10-24 19:15:18 ·
123 阅读 ·
0 评论