题解 | #判断闰年#
判断闰年
https://ac.nowcoder.com/acm/contest/19304/J
#include<iostream> using namespace std; int main() { int n; cin>>n; if(n%100!=0&&n%4==0||n%400==0)cout<<"yes"; else cout<<"no"; }
判断闰年
https://ac.nowcoder.com/acm/contest/19304/J
#include<iostream> using namespace std; int main() { int n; cin>>n; if(n%100!=0&&n%4==0||n%400==0)cout<<"yes"; else cout<<"no"; }
相关推荐