题解 | #合并表记录#
提取不重复的整数
http://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { char num[20] = {'0'}; int hp[10] = { '0' }; scanf("%s", &num); int len = strlen(num); printf("%d\n", len); for (int i = (len - 1); i >= 0; i--) { int data = num[i] - '0'; if (hp[data] != data) { printf("%d", data); hp[data] = data; } } return 0; }