11 solutions

  • 1
    @ 2025-3-4 12:48:56
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int a;
    	cin>>a;
    	if(a%400==0)cout<<"Y";
    	else if(a%100==0)cout<<'N';
    	else if(a%4==0)cout<<'Y';
    	else cout<<"N";
    	return 0;
    }
    
    • 1
      @ 2024-7-10 20:24:33

      #include<bits/stdc++.h> using namespace std; int n,mx=0; int a; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a; mx=max(mx,a); } cout<<mx<<"\n"; }

      • 1
        @ 2024-7-10 20:24:14
        #include<iostream>
        #include<iomanip>
        using namespace std;
        int a,b,c;
        int main(){
        	cin>>a>>b>>c;
        	if(a+b>c&&a+c>b&&b+c>a) cout<<"yes"<<"\n";
        	else cout<<"no"<<"\n";
                return 0;
        }
        
        • 1
          @ 2024-1-27 11:45:25
          #include <iostream>
          using namespace std;
          
          int main()
          {
          	int a;
          	cin >> a;
          	if(a % 4 == 0) cout << 'Y' << endl;
          	else cout << 'N' << endl;
          	return 0;
          }
          
          • 1
            @ 2024-1-27 9:27:46
            #include<iostream>
            #include<iomanip>
            using namespace std;
            int y;
            int main(){
            	cin>>y;
            	if((y%4==0&&y%100!=0)||y%400==0) cout<<'Y'<<"\n";
            	else cout<<'N'<<"\n";
                    return 0;
            }
            
            • 0
              @ 2024-7-9 20:04:02
              #include <iostream>
              using namespace std;
              
              int main()
              {
              	int a;
              	cin >> a;
              	if(a % 4 == 0) cout << 'Y' << endl;
              	else cout << 'N' << endl;
              	return 0;
              }
              
              • 0
                @ 2024-1-27 11:44:57
                #include <iostream>
                using namespace std;
                
                int main()
                {
                	int a;
                	cin >> a;
                	if(a % 4 == 0) cout << 'Y' << endl;
                	else cout << 'N' << endl;
                	return 0;
                }
                
                • 0
                  @ 2023-10-10 19:40:48
                  反骨的我偏要一个if写完
                  #include<cstdio>
                  using namespace std;
                  int main()
                  {
                      int n;
                      cin >> n;
                      if((n%4==0 && n%100!=0) || (n%400==0))
                      {
                      	cout << "Y";
                  	}else{
                  		cout << "N";
                  	}
                      return 0;
                  }
                  
                  • 0
                    @ 2023-10-4 15:07:23
                    #include<iostream>
                    #include<cstdio>
                    using namespace std;
                    int main()
                    {
                        int n;
                        scanf("%d",&n);
                        if (n%4==0&&n%100!=0||n%400==0&&n%3200!=0) printf("Y");
                        else printf("N");
                        return 0;
                    }
                    
                    • -1
                      @ 2023-9-19 19:12:01
                      #include <bits/stdc++.h>
                      using namespace std;
                      int main(int argc, char **argv){
                      	int n;
                      	cin >> n;
                      	if (n % 4 == 0 && n % 100 != 0){
                      		cout << "Y";
                      	}else if (n % 400 == 0){
                      		cout << "Y";
                      	}else{
                      		cout << "N";
                      	}
                      	return 0;
                      }
                      
                      • -1
                        @ 2023-9-17 11:19:50
                        #include <bits/stdc++.h>
                        using namespace std;
                        int n;
                        int main(){
                        	cin>>n;
                        	if(n%4!=0) cout<<"N";
                        	else{
                        		if(n%100==0&&n%400!=0) cout<<"N";
                        		else cout<<"Y";
                        	}
                        	return 0;
                        }
                        //简单分支
                        
                        • 1

                        Information

                        ID
                        543
                        Time
                        1000ms
                        Memory
                        256MiB
                        Difficulty
                        5
                        Tags
                        # Submissions
                        204
                        Accepted
                        72
                        Uploaded By