use std::collections::{BTreeSet, HashMap, HashSet, VecDeque}; use proconio::marker::Chars; fn main() { proconio::input! { h: i32, a: i32, d: i32, } let max_normal_attack_num = h / a + if h % a == 0 { 0 } else { 1 }; let m = (0..=max_normal_attack_num) .map(|natk| { let remain_hp = h - natk * a; if remain_hp > 0 { natk as f64 + (remain_hp / d + if remain_hp % d == 0 { 0 } else { 1 }) as f64 * 1.5 } else { natk as f64 } }) .fold(0.0 / 0.0, f64::min); println!("{m}"); }