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_15752754_170\Main.java:1: 错误: 类text2006是公共的, 应在名为 text2006.java 的文件中声明
package dancishu.java;import java.util.Scanner;public class text2006 {    static Scanner sc = new Scanner(System.in);    public static void main(String[] args) {        int i = sc.nextInt();        int j = sc.nextInt();        text1(i, j);    }    public static void text1(int m, int n) {        int sum = 0;        if (100 <= m && m <= n && n <= 999) {            for (int x = m; x <= n; x++) {                int a = x / 1 % 10;                int b = x / 10 % 10;                int c = x / 100 % 10;                if (x == a * a * a + b * b * b + c * c * c) {                    sum++;                    System.out.println(x);                }            }            if (sum==0) {                System.out.println("no");            }        } else {            System.out.println("no");        }    }}
                                                      ^
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-06 17:22:47, Gzip enabled