闰年判断:
闰年是包含额外一天的日历年.
如果年份可以被 4 整除且不能被 100 整除 或者 可以被 400 整除, 那么这一年为闰年
// import java.util.*;
public class Solution {
public boolean isLeapYear(int n) {
// write your code here
// Scanner in = new Scanner(System.in);
// n = in.nextInt();
if((n%400==0)||(n%4==0&&n%100!=0))
{
return true;
}
else
{
return false;
}
}
}
// (n % 4 == 0 && (n % 100 != 0 || n % 400 == 0));



