use std::io::{self, Read}; fn read_stdin() -> Vec { let mut buffer = String::new(); io::stdin().read_to_string(&mut buffer).ok(); buffer.trim().split('\n').map(|s| s.to_string()).collect() } fn main() { let input: Vec = read_stdin().into_iter().map(|s| s.parse::().unwrap()).collect(); let one = *&input[2]; let exchanged_one: u8 = one / 25; let one_result: u8 = if exchanged_one > 0 { one % 25 } else { one }; let twenty_five: u8 = *&input[1] + exchanged_one; let exchanged_twenty_five: u8 = twenty_five / 4; let twenty_five_result: u8 = if exchanged_twenty_five > 0 { twenty_five % 4 } else { twenty_five }; let one_hundred: u8 = *&input[0] + exchanged_twenty_five; let one_hundred_result = one_hundred % 10; println!("{}", one_result + twenty_five_result + one_hundred_result); }