結果
| 問題 |
No.2415 偶数判定!Nafmoくん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-11 13:13:30 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 553 bytes |
| コンパイル時間 | 2,917 ms |
| コンパイル使用メモリ | 119,168 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 03:44:50 |
| 合計ジャッジ時間 | 2,525 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <cassert>
#include <string>
using namespace std;
using ull = unsigned long long;
void assert_binary(string& s) {
for (auto c : s) {
assert(c == '0' || c == '1');
}
assert(1 <= s.length() && s.length() <= 64);
}
int main() {
string a, b;
cin >> a >> b;
assert_binary(a);
assert_binary(b);
ull aa = stoull(a, nullptr, 2);
ull bb = stoull(b, nullptr, 2);
if (aa % 2 && bb % 2) {
cout << "Odd" << endl;
} else {
cout << "Even" << endl;
}
return 0;
}