mirror of
https://github.com/xlucn/PAT.git
synced 2026-02-07 03:22:15 +08:00
18 lines
366 B
C
18 lines
366 B
C
#include <stdio.h>
|
|
#include <ctype.h>
|
|
|
|
int main()
|
|
{
|
|
char c;
|
|
int bad[128] = {0}; /* record keys are broken or not */
|
|
|
|
while ((c = getchar()) != '\n') /* read broken keys */
|
|
bad[toupper(c)] = 1;
|
|
|
|
while ((c = getchar()) != EOF && c != '\n') /* read string and print */
|
|
if (!bad[toupper(c)] && !(isupper(c) && bad['+']))
|
|
putchar(c);
|
|
|
|
return 0;
|
|
}
|