题解 | #明明的随机数#
明明的随机数
https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
#include <iostream> using namespace std; int main() { int n, i; int a[501] = {0}; cin >> n; while (n-- > 0) { cin >> i; a[i] = 1; } for (i=0; i<501; i++){ if(a[i] == 1){ cout << i << endl; } } return 0; } // 64 位输出请用 printf("%lld")