Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79710 李雨昊 处理随机数 C++ Wrong Answer 0 MS 276 KB 359 2024-07-09 15:13:12

Tests(0/10):


Code:

#include<iostream> using namespace std; int main() { int n, a[1001] = {0}, s; cin >> n; for (int i = 1; i <= n; i++) { cin >> s; a[s]++; } int c; for (int i = 0; i <= 1000; i++) { if (a[i] != 0) { c++; } } cout << c; for (int i = 0; i <= 1000; i++) { if (a[i] != 0) { cout << i << " "; c++; } } }


Run Info:

------Input------
9 10 29 39 67 58 48 29 57 23
------Answer-----
8 10 23 29 39 48 57 58 67
------Your output-----
419507210 23 29 39 48 57 58 67