結果

問題 No.1957 Xor Min
ユーザー tute7627
提出日時 2022-03-14 06:44:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 171 bytes
コンパイル時間 3,497 ms
コンパイル使用メモリ 191,124 KB
最終ジャッジ日時 2025-01-28 09:33:40
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 18 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){

  int A, B;
  cin >> A >> B;

  int bit = 1;
  while(bit * 2 <= A)bit *= 2;
  cout << min(bit - 1, B) << endl;
}
0