| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61831 | 许铭锐 | 处理随机数 | C++ | Compile Error | 0 MS | 0 KB | 317 | 2023-12-10 17:10:11 |
#include<iostream> #include<cstdio> using namespace std; int main() { int t[1001]= {0}; int n,m,shu; for(int i=0; i<n; i++) { cin>>shu; t[shu]++; } for(int i=0; i,n; i++) { if(t[i]!=0) { m++; } } cout<<m; for(int i=0; i,n; i++) { if(t[i]!=0) { cout<<i; return 0; }
Main.cc: In function 'int main()':
Main.cc:11:17: warning: left operand of comma operator has no effect [-Wunused-value]
for(int i=0; i,n; i++) {
^
Main.cc:18:17: warning: left operand of comma operator has no effect [-Wunused-value]
for(int i=0; i,n; i++) {
^
Main.cc:22:3: error: expected '}' at end of input
}
^
Main.cc:22:3: error: expected '}' at end of input