結果
| 問題 |
No.3150 count X which satisfies with equlation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-23 12:57:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 362 bytes |
| コンパイル時間 | 579 ms |
| コンパイル使用メモリ | 81,692 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2025-06-20 03:02:55 |
| 合計ジャッジ時間 | 1,806 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 42 |
ソースコード
#include<iostream>
#include<vector>
#include<unordered_set>
#include<algorithm>
using namespace std;
using ll = long long;
int main(void){
int a, b; cin >> a >> b;
ll ans=1;
while(a||b){
int aa=a%2, bb=b%2;
if(aa&&!bb){
cout << 0 << endl; return 0;
}
else if(aa&&bb) ans*=2ll;
a/=2, b/=2;
}
cout << ans << endl;
return 0;
}