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_35897566_14378\Main.java:1: 错误: 类CF1079A是公共的, 应在名为 CF1079A.java 的文件中声明
import java.util.HashSet; import java.util.Scanner; public class CF1079A { public static void main(String[] args) { Scanner s = new Scanner(System.in); int[] num = new int[101]; int n = s.nextInt(); int k = s.nextInt(); int max = 0; HashSet<Integer> set = new HashSet<Integer>(); for(int i =0;i<n;i++) { int a = s.nextInt(); num[a]++; max = Math.max(max, num[a]); set.add(a); } max = max%k==0?max:(max/k+1)*k; int c = 0; for (Integer integer : set) { c += max-num[integer]; } System.out.println(c); s.close(); } }
                                                           ^
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-11-26 18:21:16, Gzip enabled