18 lines
410 B
Plaintext
18 lines
410 B
Plaintext
// rustc -V
|
|
// rustc 1.2.0-nightly (0cc99f9cc 2015-05-17) (built 2015-05-18)
|
|
|
|
use std::io;
|
|
use std::str::FromStr;
|
|
|
|
fn main() {
|
|
let mut line = String::new();
|
|
io::stdin().read_line(&mut line).unwrap();
|
|
|
|
let result = line.trim()
|
|
.split(' ')
|
|
.map(|x| isize::from_str(x).unwrap())
|
|
.fold(0, |sum, x| sum + x);
|
|
|
|
println!("{}", result);
|
|
}
|