import java.util.*; import java.io.*; import java.math.*; /** * Auto-generated code below aims at helping you parse * the standard input according to the problem statement. **/ class proba { public static void main(String args[]) { Scanner in = new Scanner(System.in); int s=0; int p=1; int ss=0; int N = in.nextInt(); List<Integer> l = new ArrayList<>(); for (int i = 0; i < N; i++) { int v = in.nextInt(); l.add(v); } ListIterator<Integer> it = l.listIterator(); while(it.hasNext()){ Integer i = it.next(); while(it.hasNext()){ if(it.equals(i)) s++; } p=(s/N)*100; if (p == i) ss++; } System.out.print((ss/N)*100); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)