B闰年.cpp 437 B

1234567891011121314151617181920
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. int a;
  5. cin >> a;
  6. if (a % 4 == 0 && a % 100 != 0 || a % 400 == 0)
  7. cout << "yes";
  8. else
  9. cout << "no";
  10. return 0;
  11. }
  12. /**************************************************************
  13. Problem: 1284
  14. User: acm
  15. Language: C++
  16. Result: 正确
  17. Time:0 ms
  18. Memory:2016 kb
  19. ****************************************************************/