fork download
  1. use std::io::stdin;
  2. use std::io::BufRead;
  3. use std::io::BufReader;
  4.  
  5. fn main() {
  6. for line in BufReader::new(stdin()).lines() {
  7. match line {
  8. Ok(ref s) if s == "42" => println!("Big Question"),
  9. Ok(ref s) => println!("{}", s),
  10. _ => continue
  11. }
  12. }
  13. }
  14.  
Success #stdin #stdout 0s 5280KB
stdin
1
2
88
42
10
stdout
1
2
88
Big Question
10