题解 | #KiKi去重整数并排序#
KiKi去重整数并排序
https://www.nowcoder.com/practice/f59b914172b94c69a2b29ad0a1d9b1a7
#include <stdio.h> int main() { int n = 0; scanf("%d",&n); int arr[1001] = {0}; for(int i = 0;i < n;i++) { int tmp = 0; scanf("%d",&tmp); arr[tmp]++; } for(int i = 0;i < 1001;i++) { if(arr[i] > 0) { printf("%d ",i); } } return 0; }