题解 | #KiKi去重整数并排序#
KiKi去重整数并排序
https://www.nowcoder.com/practice/f59b914172b94c69a2b29ad0a1d9b1a7
#include<stdio.h> int main() { int n = 0; int arr[1001] = {0}; scanf("%d", &n); int i = 0 ; int m = 0; for (i = 0; i < n; i++) { scanf("%d", &m); arr[m] = m; } for (i = 0; i < 1001; i++) { if (arr[i] != 0) printf("%d ", arr[i]); } return 0; }
c语言刷题 文章被收录于专栏
c语言刷题题目