結果

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

ソースコード

diff #

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

int main(){

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

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