回答暗号给代码

万明宇  •  1个月前


9_7_1_


评论:

1 8 3


余秋烨  •  1个月前

连起来

 


万明宇  •  1个月前

?


余秋烨  •  1个月前

#include <iostream> using namespace std; bool isLeapYear(int year) { if (year % 4 == 0) { if (year % 100 == 0) { return year % 400 == 0; } return true; } return false; } int main() { int t; cin >> t; while (t--) { int n; cin >> n; if (isLeapYear(n)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }

 


万明宇  •  1个月前


#include <iostream>
using namespace std;

bool isLeapYear(int year) {
   if (year % 4 == 0) {
       if (year % 100 == 0) {
           return year % 400 == 0;
       }
       return true;
   }
   return false;
}

int main() {
   int t;
   cin >> t;
   while (t--) {
       int n;
       cin >> n;
       if (isLeapYear(n)) {
           cout << "Yes" << endl;
       } else {
           cout << "No" << endl;
       }
   }
   return 0;
}
 


万明宇  •  1个月前