結果
問題 |
No.1372 Median of Submasks
|
ユーザー |
|
提出日時 | 2022-01-13 17:59:17 |
言語 | Rust (1.83.0 + proconio) |
結果 |
RE
|
実行時間 | - |
コード長 | 498 bytes |
コンパイル時間 | 12,674 ms |
コンパイル使用メモリ | 394,040 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-11-17 08:04:33 |
合計ジャッジ時間 | 16,860 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 RE * 14 TLE * 1 |
ソースコード
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); }