結果

問題 No.822 Bitwise AND
ユーザー Pulmn
提出日時 2019-03-28 10:46:44
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 513 ms
コンパイル使用メモリ 54,212 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 01:22:49
合計ジャッジ時間 1,330 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int N,K;

int main(){
	cin>>N>>K;
	if(N<K) cout<<"INF"<<endl;
	else{
		int t=0;
		for(int i=N;i<2*N-1;i++) for(int j=0;j<=K;j++) if((i&(i+j))==N) t++;
		cout<<t<<endl;
	}
}
0