Files
PAT/PATBasic/1029.c
2022-01-08 03:01:51 +08:00

22 lines
335 B
C

#include <ctype.h>
#include <stdio.h>
int main()
{
int printed[128] = {0};
char c, line[82];
fgets(line, 82, stdin);
while ((c = getchar()) != EOF && c != '\n')
printed[toupper(c)]++;
for (char *p = line; *p; p++) {
c = toupper(*p);
if (printed[(int)c] == 0) {
putchar(c);
printed[(int)c] = -1;
}
}
return 0;
}