-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1074.cpp
44 lines (35 loc) · 776 Bytes
/
1074.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// https://judge.beecrowd.com/en/problems/view/1074
/*
Time Complexity =>
Space Complexity =>
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ifstream input("input.txt");
ofstream output("output.txt");
int N = 0, value = 0;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> value;
if (value == 0) {
cout << "NULL" << endl;
} else if (value > 0) {
if ((value & 1) == 0) {
cout << "EVEN POSITIVE" << endl;
} else {
cout << "ODD POSITIVE" << endl;
}
} else {
if ((value & 1) == 0) {
cout << "EVEN NEGATIVE" << endl;
} else {
cout << "ODD NEGATIVE" << endl;
}
}
}
return 0;
}