Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
80092 杜奕辰 找最大的数 C++ Wrong Answer 1 MS 272 KB 303 2024-07-11 11:03:31

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int a[11]; int main(){ int k,max; for(int i=1; i<=9; i++) { cin>>a[i]; } max=a[1];//假设第1个是最大值 k=1; for(int i=2;i<=10;i++){ if(a[i]>max){ max=a[1]; k=i; } } cout<<k; return 0; }


Run Info:

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