結果

問題 No.939 and or
ユーザー ktr216
提出日時 2019-12-13 12:21:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 449 bytes
コンパイル時間 1,538 ms
コンパイル使用メモリ 167,008 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-26 23:51:35
合計ジャッジ時間 2,592 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
    }
    cout << ans / 2 << endl;
}
0