結果

問題 No.1372 Median of Submasks
ユーザー Zihua WuZihua Wu
提出日時 2022-01-13 17:59:17
言語 Rust
(1.77.0)
結果
RE  
実行時間 -
コード長 498 bytes
コンパイル時間 15,736 ms
コンパイル使用メモリ 377,224 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-28 15:12:56
合計ジャッジ時間 15,727 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
10,752 KB
testcase_01 AC 0 ms
5,248 KB
testcase_02 AC 1 ms
5,248 KB
testcase_03 AC 1 ms
5,248 KB
testcase_04 AC 1 ms
5,248 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 RE -
testcase_10 AC 1 ms
5,376 KB
testcase_11 RE -
testcase_12 AC 1 ms
5,376 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

fn read_items<T>() -> Vec<T>
where
    T: std::str::FromStr,
    <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    let mut line = String::new();
    std::io::stdin().read_line(&mut line).unwrap();
    return line
        .trim()
        .split(" ")
        .filter(|&s| s.len() > 0)
        .map(|s| s.parse::<T>().unwrap())
        .collect();
}
fn main() {
    let n = read_items::<i32>()[0];

    let mut ans = 1;
    while ans * 2 <= n {
        ans *= 2;
    }

    println!("{}", ans);
}
0