From 327f478b5dc4fdb3d585068fda4076388b93262b Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Mon, 2 Nov 2020 21:30:39 +0800 Subject: [PATCH] P2955 [USACO09OCT]Even? Odd? G R41109626 --- problem/P2955/P2955.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 problem/P2955/P2955.cpp diff --git a/problem/P2955/P2955.cpp b/problem/P2955/P2955.cpp new file mode 100644 index 00000000..57623f8b --- /dev/null +++ b/problem/P2955/P2955.cpp @@ -0,0 +1,14 @@ +#include + +using namespace std; + +int main() { + int n; + cin >> n; + while (n--) { + string s; + cin >> s; + cout << ((s[s.size() - 1] - '0') % 2 ? "odd" : "even") << endl; + } + return 0; +}