Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner read = new Scanner(System.in);
- int t = read.nextInt();
- int ans[] = new int[t];
- for (int i = 0; i < t; i++) {
- ans[i] = 0;
- int n = read.nextInt();
- for (int j = 0; j < n; j++){
- int s = read.nextInt();
- if (ans[i] < s) {
- ans[i] = s;
- }
- }
- }
- for (int i = 1; i <= t; i++) {
- System.out.println("Case "+i+": "+ans[i-1]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement