結果

問題 No.1372 Median of Submasks
ユーザー DaYuanChi
提出日時 2021-02-05 21:33:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 1,534 ms
コンパイル使用メモリ 167,480 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-02 11:45:32
合計ジャッジ時間 2,320 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ll f(int n){
  ll pow = 1;
  while(n>0){
    pow *= 2;
    n--;
  }
  return pow;
}

int main(){
  ll m; cin >> m;
  int ans = 0;
  for(int i = 0; i <= 60; i++){
    if(f(i)>=m){
      ans = i;
      break;
    }
  }
  cout << f(ans-1) << endl;
  return 0;
}
0