3 条题解

  • 1
    @ 2023-10-12 9:35:04

    很无脑但是可行 image

    
    
    • 0
      @ 2023-9-27 14:52:12

      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)));
              }
          }
      
      • 0
        @ 2023-8-9 20:54:34

        比较正常的解法:

        image

        看起来比较整活的解法:

        image

        • 1

        信息

        ID
        400
        时间
        1000ms
        内存
        256MiB
        难度
        7
        标签
        (无)
        递交数
        1846
        已通过
        424
        上传者