complete 18411.rs
This commit is contained in:
20
storage/zeta/rs/completed/18411.rs
Normal file
20
storage/zeta/rs/completed/18411.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
use std::io::{read_to_string, stdin};
|
||||
|
||||
fn main() {
|
||||
let temp = read_to_string(stdin()).unwrap();
|
||||
let mut iter = temp
|
||||
.split_ascii_whitespace()
|
||||
.map(|x| x.parse::<usize>().unwrap());
|
||||
|
||||
let a = iter.next().unwrap();
|
||||
let b = iter.next().unwrap();
|
||||
let c = iter.next().unwrap();
|
||||
|
||||
let ab = a + b;
|
||||
let bc = b + c;
|
||||
let ca = c + a;
|
||||
|
||||
let abc = ab.max(bc).max(ca);
|
||||
|
||||
println!("{}", abc);
|
||||
}
|
||||
Reference in New Issue
Block a user