题解 | #KiKi设计类继承#
KiKi设计类继承
http://www.nowcoder.com/practice/699ba050e2704591ae3e62401a856b0e
#include<stdio.h> int main() { int n, i, j; scanf("%d", &n); int a[n]; for(i = 0; i < n; i++){ scanf("%d", &a[i]); } for(i = 0; i < n - 1; i++){ for(j = i+1; j < n; j++){ if(a[i] == a[j]){ a[j] = 0; } } } for(i = 0; i < n; i++){ if(a[i] != 0){ printf("%d ", a[i]); } } return 0; }