use std::io; use std::io::{Stdin, BufRead}; struct Input { amount: i32, vat: i32, } fn main() { let mut stdin = io::stdin(); let input = read_input(&mut stdin); println!("{}", (input.amount * (100 + input.vat) / 100)); } fn read_input(stdin: &mut Stdin) -> Input { let mut lock = stdin.lock(); let mut s = String::new(); lock.read_line(&mut s).expect("can not read first line"); let tokens: Vec = s.trim_end().split(" ").map(|s| s.parse().expect("can't parse")).collect(); s.clear(); Input { amount: tokens[0], vat: tokens[1], } }