Ad
Code
Diff
  • bool isLeap(int year) {
      return (year&3) == 0 && (year % 100 != 0 || (year&15) == 0);
    }
    • bool isLeap(int year) {
    • if(year % 4 != 0 || (year % 100 == 0 && year % 400 != 0)) return false;
    • return true;
    • return (year&3) == 0 && (year % 100 != 0 || (year&15) == 0);
    • }