結果
問題 |
No.822 Bitwise AND
|
ユーザー |
![]() |
提出日時 | 2019-04-26 21:47:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 284 bytes |
コンパイル時間 | 1,487 ms |
コンパイル使用メモリ | 167,148 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 03:04:25 |
合計ジャッジ時間 | 2,331 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long N,K; cin>>N>>K; if(N==0&&K!=0){ cout<<"INF"<<endl; return 0; } long long ans = 0; for(int i=N;i<=2*N;i++){ for(int j=0;j<=K;j++){ if((i&(i+j))==N)ans++; } } cout<<ans<<endl; return 0; }