최댓값
문제
내 풀이
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int[] arr = new int[9];
int n = 0;
int val = 0;
for(int i = 0; i < 9; i++)
{
arr[i] = Integer.parseInt(br.readLine());
if(arr[i] > val)
{
val = arr[i];
n = i;
}
}
System.out.println(arr[n]);
System.out.print(n+1);
}
}