Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151944 张蔚林 找最大的数 C++ Compile Error 0 MS 0 KB 240 2026-04-19 12:29:08

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int i,a[10]; int mxa=1; int w; for(i=0;i<10;i++){ cin>>a[i]; } for(i=0;i<10;i++){ if(max<a[i]){ max=a[i]; w=i; } } cout<<w+i<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:13: error: the value of 'a' is not usable in a constant expression
   if(max