#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("in.txt","r",stdin);
int n;cin>>n;
string maxnum="0";
int id=0;
for(int i=1;i<=n;i++){
string temp;
cin>>temp;
if(temp.length()>maxnum.length()){
maxnum=temp;id=i;
}else if(temp.length()==maxnum.length()){
if(temp>maxnum){
maxnum=temp;id=i;
}
}
}
cout<<id<<endl;
cout<<maxnum;
return 0;
}
895

被折叠的 条评论
为什么被折叠?



