結果
問題 |
No.939 and or
|
ユーザー |
|
提出日時 | 2019-12-13 12:23:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 1,424 ms |
コンパイル使用メモリ | 166,304 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-26 23:53:34 |
合計ジャッジ時間 | 2,376 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 WA * 9 |
ソースコード
#include "bits/stdc++.h" #define rep(i,n) for(int i=0;i<n;i++) using namespace std; using ll = long long; const ll MOD = 998244353; int main() { ll A, B; cin >> A >> B; ll ans = 1; rep(i, 30) { int c = A % 2, d = B % 2; if (c == 1 && d == 0) { cout << 0 << endl; return 0; } if (c == 0 && d == 1) ans *= 2; A /= 2; B /= 2; } if (ans > 1) ans /= 2; cout << ans << endl; }