結果

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

ソースコード

diff #

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

int main(){

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

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