0_0_38820835_3766\Main.java:1: 错误: 解析时已到达文件结尾
import java.util.Scanner;public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t =sc.nextInt(); while(t-->0){ int n =sc.nextInt(); int a = (int)n/2;//抢险小分队 int b = n-a; int c = (int)b*2/3;//医疗小分队 int d = n-a-c;//通信小分队 int num=0; num =a%10==0?(int)a/10:(int)(a/10)+1; num =c%10==0?(int)c/10+num:(int)(c/10)+1+num; num =d%10==0?(int)d/10+num:(int)(d/10)+1+num; System.out.println(num); } }}
^
0_0_38820835_3766\Main.java:1: 错误: 解析时已到达文件结尾
import java.util.Scanner;public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t =sc.nextInt(); while(t-->0){ int n =sc.nextInt(); int a = (int)n/2;//抢险小分队 int b = n-a; int c = (int)b*2/3;//医疗小分队 int d = n-a-c;//通信小分队 int num=0; num =a%10==0?(int)a/10:(int)(a/10)+1; num =c%10==0?(int)c/10+num:(int)(c/10)+1+num; num =d%10==0?(int)d/10+num:(int)(d/10)+1+num; System.out.println(num); } }}
^
2 个错误
|