判断闰年

bool is_leap_year(unsigned int n) {
  return n % 4 == 0 && n % 100 != 0 || n % 400 == 0;
}
原文地址:https://www.cnblogs.com/chenkkkabc/p/3035300.html