QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#623232#5732. Even or OddoschlimgenAC ✓1ms3812kbC++20622b2024-10-09 10:46:472024-10-09 10:46:48

Judging History

你现在查看的是最新测评结果

  • [2024-10-09 10:46:48]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3812kb
  • [2024-10-09 10:46:47]
  • 提交

answer

#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <fstream>



class inputParams {
public:
  int n;

  inputParams() : n(0) {
    read();
  }

  void read() {
    std::string line;

    std::getline(std::cin, line);
    
    n = std::stoi(line);
  }
};

std::string createOutput(int n) {
  if(n % 4 == 0) {
    return "Even";
  } else if(n % 2 == 0) {
    return "Odd";
  } else {
    return "Either";
  }
}


int main() {
  inputParams input;

  std::string output = createOutput(input.n);

  std::cout << output << std::endl;

  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3812kb

input:

1

output:

Either

result:

ok single line: 'Either'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

2

output:

Odd

result:

ok single line: 'Odd'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3

output:

Either

result:

ok single line: 'Either'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

4

output:

Even

result:

ok single line: 'Even'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

5

output:

Either

result:

ok single line: 'Either'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

6

output:

Odd

result:

ok single line: 'Odd'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

7

output:

Either

result:

ok single line: 'Either'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

8

output:

Even

result:

ok single line: 'Even'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

9

output:

Either

result:

ok single line: 'Either'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

10

output:

Odd

result:

ok single line: 'Odd'