ACM 出现Runtime error 10
packageSfks;importjava.util.Scanner;publicclassMain{staticint[]a;publicstaticvoidmain...
package Sfks;import java.util.Scanner;public class Main { static int[] a; public static void main(String[] args) { while (true) { Cal(); } } public static void Cal() { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); a = new int[l]; for (int i = 0; i < l; i++) a[i] = sc.nextInt(); int num = 0; for (int b : a) num += b; if (num % 4 == 0) System.out.println(num / 4); else System.out.println(num / 4 + 1); }}
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询