結果
問題 |
No.2415 偶数判定!Nafmoくん
|
ユーザー |
|
提出日時 | 2024-02-06 09:47:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,248 bytes |
コンパイル時間 | 1,939 ms |
コンパイル使用メモリ | 191,840 KB |
最終ジャッジ日時 | 2025-02-19 02:09:53 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG_ #include <compe/debug.hpp> #else #define dump(...) #endif #define FastIO cin.tie(nullptr), ios_base::sync_with_stdio(false); #define rep(i, n) for (int i = 0; (int)i < n; ++i) #define repa(i, a, n) for (int i = a; (int)(i) < (n); (++i)) #define rrep(i, n) for (int i = (n - 1); (int)i >= 0; --i) #define rrepa(i, a, n) for (int i = a; (int)i >= 0; --i) #define EACH(x, a) for (auto& x : a) #define output(msg) cout << (msg) << '\n' #define die(msg) \ do { \ cout << msg << endl; \ exit(0); \ } while (0) template <typename T> bool chmax(T& a, const T& b) { return ((a < b) ? (a = b, true) : (false)); } template <typename T> bool chmin(T& a, const T& b) { return ((a > b) ? (a = b, true) : false); } using llint = long long int; using ullint = unsigned long long int; ullint conv2to10(const string& s) { ullint total{}; rep(i, (int)s.size()) { total *= 2; if (s[i] == '1') { total += 1; } } return total; } int main() { FastIO; string a, b; cin >> a >> b; ullint aa = conv2to10(a); ullint bb = conv2to10(b); if (aa % 2 == 1 && bb % 2 == 1) output("Odd"); else output("Even"); }