Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
124184 李俊博 找最大的数 C++ Wrong Answer 0 MS 276 KB 1101 2025-07-11 10:18:41

Tests(0/10):


Code:

//double #include<iostream> using namespace std; int a[15];//数组的定义 int main(){ /** 88 //int n[10]={1,2,3,4,5,6,7,8,9,10}; int n; cin>>n; //数组输入 for(int i=1;i<=n;i++){ cin>>a[i]; } //数组输出 for(int i=n;i>=1;i--){ cout<<a[i]<<" "; } int s=0; for(int i=1;i<=5;i++){ cin>>a[i]; s+=a[i]; } printf("%.2f\n",s/5.0); for(int i=1;i<=5;i++){ if(a[i]>s/5.0){ cout<<a[i]<<" "; } } **/ for(int i=1;i<=10;i++){ cin>>a[i]; } int m=a[1]; int mi=1; for(int i=2;i>=10;i++){ if(a[i]>m){ m=a[i]; mi=i; } } cout<<mi; return 0; }


Run Info:

------Input------
540 810 559 973 744 226 261 427 615 615
------Answer-----
4
------Your output-----
1