mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
18 lines
324 B
Rust
18 lines
324 B
Rust
//@ check-pass
|
|
|
|
fn from_stdin(min: u64) -> Vec<u64> {
|
|
use std::io::BufRead;
|
|
|
|
let stdin = std::io::stdin();
|
|
let stdin = stdin.lock();
|
|
|
|
stdin.lines()
|
|
.map(Result::unwrap)
|
|
.map(|val| val.parse())
|
|
.map(Result::unwrap)
|
|
.filter(|val| *val >= min)
|
|
.collect()
|
|
}
|
|
|
|
fn main() {}
|