首页 > 其他 > 详细

牛客网暑期ACM多校训练营(第五场)

时间:2018-08-19 21:37:45      阅读:203      评论:0      收藏:0      [点我收藏+]

J-plan

题目描述

There are n students going to travel. And hotel has two types room:double room and triple room. The price of a double room is p2 and the price of a triple room is p3.Now you need to calulate the minimum total cost of these students.

输入描述:

The first line has three integers n, p2, p3

输出描述:

Output the minimum total cost.
示例1

输入

4 2 3

输出

4
示例2

输入

5 1 3

输出

3

备注:

1<=n<=10^9
1<=p2,p3<=10^9
解题思路:
AC代码:

牛客网暑期ACM多校训练营(第五场)

原文:https://www.cnblogs.com/acgoto/p/9502598.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!