6 条题解

  • 1
    @ 2026-1-26 15:28:18
    #include <iostream>
    using namespace std;
    int main()
    {
        int a;
        cin >> a;
        if (a % 2 == 0)
            cout << "even";
        else
            cout << "odd";
        return 0;
    }
    • 1
      @ 2025-12-21 21:30:56
      #include<iostream>
      #include<cstdio>
      #include<cctype>
      #include<string.h>
      #include<math.h>
      #include<cmath>
      #include<algorithm>
      #include<iomanip>
      using namespace std;
      int main()
      {
      	long long a;
      	cin>>a;
      	if(a%2!=0)
      	{
      		cout<<"odd"; 
      	}
      	else
      	{
      		cout<<"even";	
      	} 
      	return 0;
      }
      
      
      
      • 1
        @ 2025-7-4 18:50:24
        #include<bits/stdc++.h>
        using namespace std;
        int main ()
        {
        	int a;
        	cin >>a;
        	if(a%2==1)
        	{
        		cout << "odd";
        	}
        	else{
        		cout << "even";
        	}
        }
        
        
        • 1
          @ 2025-5-16 20:18:33
          #include<bits/stdc++.h>
          using namespace std;
          int main ()
          {
          	int a;
          	cin >>a;
          	if(a%2==1)
          	{
          		cout << "odd";
          	}
          	else{
          		cout << "even";
          	}
          }
          
          
          • 0
            @ 2022-11-13 13:32:14
            #include <bits/stdc++.h>
            
            using namespace std;
            
            int main()
            {
                int a;
            
                cin >> a;
            
                if (a % 2 == 0)
                {
                    cout << "even";
                }
                else
                {
                    cout << "odd";
                }
            
                return 0;
            }
            
            • -1
              @ 2025-3-11 13:46:24
              #include <queue>
              #include <math.h>
              #include <stack>
              #include <stdio.h>
              #include <iostream>
              #include <vector>
              #include <iomanip>
              #include <string.h>
              #include <algorithm>
              using namespace std;
              #define elif else if
              #define int long long
              #define float double
              #define N 30000010
              #define INF 0xc00000fd
              #define scf scanf
              #define ptf printf
              #define gtc getchar
              #define ptc putchar
              #define inr int n = read()
              #define imr int m = read()
              #define psp ptc(' ')
              #define pel ptc('\n')
              #define pzr ptc('0')
              #define fin for(int i = 1; i <= n; i++)
              #define fim for(int i = 1; i <= m; i++)
              #define fjn for(int j = 1; j <= n; j++)
              #define fjm for(int j = 1; j <= m; j++)
              #define rai fin	a[i] = read()
              #define wct write(cnt)
              #define pct print(cnt)
              #define was write(ans)
              #define pas print(ans)
              queue<int> Q;
              stack<int> S;
              vector<int> V;
              inline int wei(int n){
              	int cnt = 0;
              	while(n > 0){
              		n /= 10;
              		cnt++;
              	}
              	return cnt;
              }
              inline bool isPrime(int n){
              	if(n < 2)
              		return 0;
              	for(int i = 2; i * i <= n; ++i)
              		if(n % i == 0)
              			return 0;
              	return 1;
              }
              inline int read(string n){
              	int x = 0, f = 1;
              	ptf("%s", n.c_str());
              	char c = gtc();
              	while(c < '0'  ||  c > '9'){
              		if(c == '-')
              			f = -1;
              		c = gtc();
              	}
              	while(c >= '0'  &&  c <= '9'){
              		x = x * 10 + c - 48;
              		c = gtc();
              	}
              	return x * f;
              }
              inline float input(string n){
              	float x = 0, f = 1, x2 = 0, cnt = 0, i = 0;
              	ptf("%s", n.c_str());
              	char c = gtc();
              	while(c < '0'  ||  c > '9'){
              		if(c == '-')
              			f = -1;
              		c = gtc();
              	}
              	while(c >= '0'  &&  c <= '9'){
              		x = x * 10 + c - 48;
              		c = gtc();
              	}
              	c = gtc();
              	while(c >= '0'  &&  c <= '9'){
              		x2 = x2 * 10 + c - 48;
              		cnt++;
              		c = gtc();
              	}
              	for(; i < cnt; i++)
              		x2 /= 10.0;
              	return (x + x2) * f;
              }
              inline void write(int n) {
                  if(n < 0){
                      ptc('-');
                      n = -n;
                  }
                  if(n > 9)
              		write(n / 10);
                  ptc(n % 10 + '0');
              	return;
              }
              inline void print(int n, float m){
              	write(m);
              	m -= (int)m;
              	ptc('.');
              	int cnt = 0;
              	while(m - (int)m && n - cnt){
              		m *= 10;
              		ptc((int)m % 10 + '0');
              		cnt++;
              	}
              	n -= cnt;
              	fin
              		pzr;
              	return;
              }
              #define input() input("")
              #define read() read("")
              inr;
              inline void Main(){
              	puts(n % 2 ? "odd" : "even");
              	return;
              }
              signed main(signed argc, char **argv){
              	Main();
              	pel;
              	return 0;
              }
              
              • 1

              信息

              ID
              869
              时间
              1000ms
              内存
              128MiB
              难度
              2
              标签
              递交数
              127
              已通过
              77
              上传者