Annhasrecentlystartedcommutingbysubway.Weknowthataoneridesubwayticketcostsarubles.Besides,Annfoundoutthatshecanbuyaspecialticketformrides(shecanbuyitseveraltimes).Itcostsbrubles.Anndidthemath;shewillneedtousesubwayntimes.HelpAnn,tellherwhatistheminimumsumofmoneyshewillhavetospendtomakenrides?InputThesinglelinecontainsfourspace-separatedintegersn,m,a,b(1 ≤ n, m, a, b ≤ 1000)—the...
近期评论