結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
iqueue02
|
| 提出日時 | 2019-12-02 16:23:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 414 bytes |
| コンパイル時間 | 1,472 ms |
| コンパイル使用メモリ | 167,332 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-24 08:03:08 |
| 合計ジャッジ時間 | 2,464 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 3 WA * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int,int> P;
int main(){
ll a, b;
cin >> a >> b;
ll res = 0;
for (int i = 0; i < 31; i++) {
int bit1 = (a & (1 << i)), bit2 = (b & (1 << i));
if (bit1 && !bit2) res = 0;
if (!bit1 && bit2) res++;
}
cout << res << endl;
return 0;
}
iqueue02