1.

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, WS10/11
* Problem: 11799 Horror Dash
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2899
*
* @author Fabian Liebl
* @version 1.0, 10/06/2010
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.340
*/

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

int testCases = sc.nextInt();
int n, max;

for (int tc = 0; tc < testCases; tc++) {
max = 0;
n = sc.nextInt();
for (int i = 0; i < n; i++) {
max = Math.max(max, sc.nextInt());
}
System.out.printf("Case %d: %d\n", tc + 1, max);
}
}

}

2.

/**
* ACM Programming
* Problem: 11799 - Horror Dash
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=117&problem=2899&mosmsg=Submission+received+with+ID+8066493
* Time: 0.136
* ACCEPTED
* @author Christoph Miesel
*/

import java.io.*;
import java.util.*;

public class ScaryClown
{
public static void main(String[] args) throws IOException
{
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer t = new StringTokenizer(r.readLine());
int cases = Integer.parseInt(t.nextToken());
int[] speed;
int max;
for(int c = 1; c <= cases; ++c)
{
t = new StringTokenizer(r.readLine());
int number = Integer.parseInt(t.nextToken());
speed = new int[number];
max = 0;
for(int k = 0; k < number; ++k)
{
speed[k] = Integer.parseInt(t.nextToken());
}
for(int k = 0; k < number; ++k)
{
if(speed[k] > max)
max = speed[k];
}
System.out.println("Case "+c+": "+max);
}
}

}