mirror of
https://github.com/xlucn/PAT.git
synced 2026-02-06 19:12:14 +08:00
22 lines
335 B
C
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;
|
|
}
|