4 条题解

  • 3
    @ 2026-6-7 10:25:56

    #include <bits/stdc++.h>

    using namespace std;

    int main() {

    int a;
    
    cin>>a;
    

    if ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)) {

    cout << "Y" << endl;
    

    } else {

    cout << "N" << endl;
    

    }

    return 0;
    

    }

    • 1
      @ 2026-5-31 15:37:00
      #include <bits/stdc++.h>
      using namespace std;
      
      int main() {
      	int a;
      	cin>>a;
      if ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)) {
      
          cout << "Y" << endl;
      } else {
          cout << "N" << endl;
      }
      
      	return 0;
      }
      
      
      
      • -3
        @ 2026-5-24 11:38:45

        #include using namespace std;

        int main(){ int a; cin >> a; if(a%40&&a%1000||a%400==0) { cout << a << "是闰年"; } else { cout << a << "是平年"; } return 0; }

        • -4
          @ 2026-5-24 10:41:26

          #include using namespace std;

          int main() { int a; cin >> a ; if (a % 4 == 0 || a % 100 != 0 && a % 400 == 0) { cout << "Y"; } else { cout << "N"; }

          return 0;
          

          }

          • 1

          信息

          ID
          30945
          时间
          1000ms
          内存
          256MiB
          难度
          5
          标签
          (无)
          递交数
          102
          已通过
          42
          上传者