自己写的。C语言。题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
#include<stdio.h> int main() { int c, i = 0, j, k; char line[9]; while ((c = getchar()) != 10) { line[i++] = c; } j = i - 1; while (j >= 0) { for (k = j + 1; k < i; k++) { if (line[k] == line[j]) { k = i + 1; } } if (k == i) { printf("%c", line[j]); } j--; } printf("\n"); return 0; }