题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
#include <stdio.h> int main() { int a, b = 0, j, c[50] = {0}, i = 0; while (scanf("%d", &a) != EOF) { while (a / 10 != 0) { c[i] = a % 10; a = a / 10; i++; } c[i]=a; while (b <=i) { for (j = 0; j < b; j++) { if (c[b] == c[j]) { c[b] = 0; break; } } if (c[b] != 0) { printf("%d", c[b]); } b++; } } return 0; }