1. 

/**
* ACM Training 2010
* ACM Problem #10370 - Above Average
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=15&page=show_problem&problem=1311
*
* @author Felix Dietrich
* @version 1.0, 04/09/2010
*
* Methode: Selection
* Status : Accepted
* Runtime: 0.584
*/

import java.util.*;

public class Main
{
public static void main(String... strs)
{
Scanner sc = new Scanner(System.in);

int testcases = sc.nextInt();
List<Integer> grades = new ArrayList<Integer>();

for(int i=0; i<testcases; i++)
{
int people = sc.nextInt();

grades.clear();
for(int k=0; k<people; k++)
{
grades.add(sc.nextInt());
}

float average = sum(grades) / (float)grades.size();

System.out.print(String.format("%.03f", 100.0*(float)choose(grades, average).size() / grades.size()));
System.out.println("%");
}
}

public static List<Integer> choose(List<Integer> inputlist, float totest)
{
List<Integer> result = new ArrayList<Integer>();
for(int element: inputlist)
{
// do sth. with result
if(element > totest)
result.add(element);
}
return result;
}

public static int sum(List<Integer> inputlist)
{
int result = 0;
for(int element: inputlist)
{
result += element;
}
return result;
}
}
2.

/**FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* Problem: 10370 Above Average
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=15&page=show_problem&problem=1311
*
* @author Vnukova Yulia
* @version 1.0, 8/04/2010
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.468 **/




import java.text.DecimalFormat;
import java.util.Scanner;


public class Main {

/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner (System.in);
int count = sc.nextInt();

//DecimalFormat df = new DecimalFormat("#.###");
int [] array = new int[1001];
int average =0 ;
int c;


while (count > 0){
c = 0;

array[0] = sc.nextInt();
for (int i=1; i <= array[0]; i++){
array[i]= sc.nextInt();}

average = sum(array)/ array[0];
for(int j=1; j <= array[0]; j++){

if (array[j] > average){
c++;
}
}

System.out.printf("%2.3f%%\n", (c * 100.0 /array[0]));
count--;
}
}

private static int sum(int[] array) {
int sum = 0;
for (int i=1; i <= array[0]; i++)
sum+=array[i];
return sum;
}}
3.


/**

* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10

* Problem: 10370 - Above Average

* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=15&page=show_problem&problem=1311

* @author Viktoriya Ryabova

* @version 1.0, 04/23/2010

*

* Method : Ad-Hoc

* Status : accepted

* Runtime: 0.488

*/

import java.text.DecimalFormat;

import java.util.Scanner;

 

public class Main {

public static void main(String[] args) {

// TODO Auto-generated method stub

Scanner sc = new Scanner (System.in);

//anzahl der fälle

int count = sc.nextInt();

DecimalFormat f = new DecimalFormat ("#0.000");

int [] array = new int [1001];

while(count>0){

count--;

//wie viele werte noch in array noch eingelesen werden sollten

array[0]=sc.nextInt();

for(int i=1; i<=array[0];i++){

array[i]=sc.nextInt();

}

System.out.println(f.format(average(array)*100.0/array[0])+"%");

}

}

// summe von zahlen im array

public static int countSum (int array[]){

int sum=0;

for(int i=1; i<=array[0];i++){

sum+=array[i];

}

return sum;

}

//wie viele sind überdurchschnittlich

public static int average (int array[]){

int count=0;

//summe durch anzahl der werte

double average = countSum(array)/array[0];

for(int i=1; i<=array[0];i++){

if(array[i]>average)count++;

}

return count;

}

}