6-14 Duplicated Numbers (10分)
This program reads a lot of integers, in which may be duplicated numbers. The program picks out all the duplicated ones and sorts the remainders in a descendent order.
函数接口定义:
public static ArrayList<Integer> pick(ArrayList<Integer> a);
a
is the ArrayList
to be parsed and returns the result as an ArrayList
.
裁判测试程序样例:
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;
public class Main {
/* 请在这里填写答案 */
public static void main(String[] args) {
ArrayList<Integer> lst = new ArrayList<>();
Scanner in = new Scann