結果
問題 | No.822 Bitwise AND |
ユーザー |
![]() |
提出日時 | 2019-03-28 10:41:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 213 bytes |
コンパイル時間 | 486 ms |
コンパイル使用メモリ | 55,420 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 18:10:03 |
合計ジャッジ時間 | 1,528 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
ソースコード
#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;i++) for(int j=0;j<=K;j++) if((i&(i+j))==N) t++;cout<<t<<endl;}}