* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package UVA_RESOLTO;
import java.util.Scanner;
/**
*
* @author dam116
*/
public class UVA11799_HorrorDash {
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
int num;
String cadena;
String[] numeros;
num = entrada.nextInt();
entrada.nextLine();
int max = 0;
for (int i = 1; i <= num; i++) {
cadena = entrada.nextLine();
numeros = cadena.split(" ");
for (String numero : numeros) {
max = Math.max(max, Integer.parseInt(numero));
}
System.out.println("Case " + i + ": " + max);
max = 0;
}
}
}
No hay comentarios:
Publicar un comentario