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_33256312_23530\Main.java:2: 错误: 类ACM2028是公共的, 应在名为 ACM2028.java 的文件中声明
public class ACM2028 {        static long gcd(long a, long b) {        long r = a % b;        while (r != 0) {            a = b;            b = r;            r = a % b;        }        return b;    }         static long lcm(long a, long b) {        return a * b / gcd(a, b);    }     public static void main(String[] args) {        Scanner in = new Scanner(System.in);        while (in.hasNext()) {            int n = in.nextInt();            long result = 1;            for (long i = 0; i < n; i++) {                long num = in.nextLong();                result = lcm(result, num);            }            System.out.println(result);        }    }}
       ^
1 个错误


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-10-07 00:17:35, Gzip enabled