C++ 代码
#include<bits/stdc++.h>
#include<cstdio>
using namespace std;
int main(){
int x, max = -1, index;
for (int i = 1; i <= 100; i++){
scanf("%d", &x);
if (x > max) max = x, index = i;
}
printf("%d\n%d", max, index);
return 0;
}