Skip to content

Instantly share code, notes, and snippets.

@trendsetter37
Created January 29, 2017 17:50
Show Gist options
  • Save trendsetter37/cae42f6b26b936aa9e6567482f7b721f to your computer and use it in GitHub Desktop.
Save trendsetter37/cae42f6b26b936aa9e6567482f7b721f to your computer and use it in GitHub Desktop.
HackerEarth Input for Rust
use std::io;
fn main() {
let mut input = String::new();
io::stdin().read_line(&mut input)
.expect("Failed to read line.");
let test_cases: u16 = input
.trim() // trim new line char
.parse()
.expect("Failed to parse unsigned int.");
println!("test_cases: {}", test_cases);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment