3 条题解

  • 0
    @ 2025-2-14 18:54:22
    using namespace std;
    int main()
    {
        int y;
        cin>>y;
        if((y%400 == 0) || (y%4 == 0 && y%100!=0))
        {
            cout<<"yes";
        }
        else
        {
            cout<<"no";
        }
        return 0;
    }
    • 0
      @ 2024-10-13 21:12:11
      #include <iostream>
      using namespace std;
      
      int main() {
          int year;
          cin >> year;
          // 判断是否为闰年
          if ((year % 4 == 0 && year % 100!= 0) || (year % 100 == 0 && year % 400 == 0)) {
              cout << "yes";
          } else {
              cout << "no";
          }
          return 0;
      }
      
      • 0
        @ 2024-10-13 20:59:12

        #include #include using namespace std; int main(){ int a; cin>>a; if(a%40&&a%100!=0){ cout<<"yes"; } else if(a%1000&&a%400==0){ cout<<"yes";

        }else{
        	cout<<"no";
        }
        
        return 0;
        

        }

        • 1

        信息

        ID
        48
        时间
        1000ms
        内存
        256MiB
        难度
        3
        标签
        递交数
        88
        已通过
        46
        上传者