F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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 个错误


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 03:59:51, Gzip enabled