結果

問題 No.1372 Median of Submasks
ユーザー phspls
提出日時 2022-10-07 23:32:59
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 11,300 ms
コンパイル使用メモリ 401,824 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 21:44:22
合計ジャッジ時間 12,546 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let n: usize = n.trim().parse().unwrap();

    let result = (0..60).rev().filter(|&i| ((n >> i) & 1) == 1).map(|i| 1usize << i).nth(0).unwrap();
    println!("{}", result);
}
0