結果

問題 No.3150 count X which satisfies with equlation
ユーザー shobonvip
提出日時 2025-05-21 06:24:30
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 1,915 ms
コンパイル使用メモリ 191,284 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-20 03:02:14
合計ジャッジ時間 3,213 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 42
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main() {
	int a, b; cin >> a >> b;
	if ((a | b) != b){
		cout << 0 << '\n';
		return 0;
	}
	cout << (1 << __builtin_popcount(a)) << endl;
}
0