3 条题解
-
0
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); short n = scanner.nextShort(); short a1 = scanner.nextShort(), a2 = scanner.nextShort(); short b1 = scanner.nextShort(), b2 = scanner.nextShort(); short c1 = scanner.nextShort(), c2 = scanner.nextShort(); int price1 = ((int) Math.ceil((double) n / a1)) * a2; int price2 = ((int) Math.ceil((double) n / b1)) * b2; int price3 = ((int) Math.ceil((double) n / c1)) * c2; System.out.println(Math.min(price1, Math.min(price2, price3))); } }
- 1
信息
- ID
- 400
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 1846
- 已通过
- 424
- 上传者