結果

問題 No.1372 Median of Submasks
ユーザー Mister
提出日時 2021-02-05 23:15:27
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 908 ms
コンパイル使用メモリ 65,536 KB
最終ジャッジ日時 2025-01-18 13:03:56
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#line 1 "main.cpp"
#include <iostream>

using namespace std;
using lint = long long;

void solve() {
    lint n;
    cin >> n;

    for (int i = 60; i >= 0; --i) {
        if ((n >> i) & 1) {
            cout << (1LL << i) << "\n";
            return;
        }
    }
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    solve();

    return 0;
}
0