5 条题解

  • 6
    @ 2023-6-20 20:01:41
    #include <iostream>
    using namespace std;
     
    int main()
    {
    	int n;
    	cin >> n;
    	if (n%2 == 0)
    		cout << "even" << endl;
    	else 
    		cout << "odd" << endl;
    	return 0;
    }
    
    • 2
      @ 2023-7-14 21:24:05

      这才叫最短,请不要颠覆了它👀️

      #include <iostream>
      int main(){
          int a;
          std::cin>>a;
          if(a%2) std::cout<<"odd";
          else std::cout<<"even";
          return 0;}
      
      • 2
        @ 2023-6-24 12:43:22

        最短代码:

        #include <bits/stdc++.h>
        using namespace std;
        int main()
        {
            int n;
            cin >> n;
            if (n % 2 == 1)
            {
                cout << "odd";
                return 0;
            }
            cout << "even";
            return 0;
        }
        
        • -2
          @ 2023-8-18 18:51:19

          额~~~

          #include<bits/stdc++.h>
          int main(){int a; std::cin >> a; if(a%2==0) std::cout << "even"; else std::cout << "odd"; return 0;}
          
          
          • -2
            @ 2023-6-20 21:10:17
            #include<bits/stdc++.h>
            using namespace std;
            int main(){
                int a;
                cin>>a;
                if (a%2==1)
                {
                    cout <<"odd";
                }
                else
                {
                    cout <<"even";
                }
                return 0;
            }
            //这个真的没有技术含量
            
            • 1

            信息

            ID
            161
            时间
            1000ms
            内存
            128MiB
            难度
            5
            标签
            递交数
            5470
            已通过
            2091
            上传者