結果
問題 | No.939 and or |
ユーザー |
![]() |
提出日時 | 2020-01-15 20:34:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 633 ms |
コンパイル使用メモリ | 66,560 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 19:20:52 |
合計ジャッジ時間 | 1,908 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 10 WA * 20 |
ソースコード
#include <vector>#include <iostream>using namespace std;int main() {long long X, Y;cin >> X >> Y;long long ans = 1;for (int i = 0; i < 32; ++i) {int b1 = ((X >> i) & 1), b2 = ((Y >> i) & 1);if (b1 == 1 && b2 == 0) ans = 0;if (b1 == 0 && b2 == 1) ans *= 2;}cout << ans << endl;return 0;}