Java 代码
import java.util.Scanner;
import java.util.HashSet;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int n = cin.nextInt();
HashSet s = new HashSet();
for (int i = 0; i < n; i ++)
{
s.add(cin.nextInt());
}
System.out.println(s.size());
}
}
牛