Java 代码
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int max = 0;
int loc = 0;
for (int i = 0; i < 100; i ++)
{
int a = cin.nextInt();
if (a > max)
{
max = a;
loc = i + 1;
}
}
System.out.println(max);
System.out.println(loc);
}
}