Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61841 许铭锐 处理随机数 C++ Compile Error 0 MS 0 KB 331 2023-12-10 17:15:31

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main() { int t[1001]= {0}; int n,sum=0,shu; cin>>n; for(int i=0; i<n; i++) { cin>>shu; t[shu]++; if(t[shu]==1){ sum++ } } cout<<sum<<endl; for(int i=0; i<=1000; i++) { if(t[i]!=0) { cout<<i<<" "; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:3: error: expected ';' before '}' token
   }
   ^