华为-算法---测试开发工程师----摘要牛客网

Java面试题---摘要牛客网-CSDN博客


package extendNiuKeWang;


import java.util.Scanner;

public class GoodHuaWei {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int money = sc.nextInt();
        System.out.println("n值总金额:"+money);
        int n = sc.nextInt();
        System.out.println("n值总件数:"+n);
        if(n<=0||money<=0) {
            System.out.println(0);
        }


        //
        good[] Gs = new good[n+1];
        for (int i = 1; i <= n; i++) {
            int v = sc.nextInt();
            System.out.println("第一件价格:"+v);
            int p = sc.nextInt();
            System.out.println("第一件重要度:"+p);
            int q = sc.nextInt();
            System.out.println("第一件是附件还是主件:

你可能感兴趣的:(测试面试,java,开发语言)