PAT 乙级 1029

代码

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: a2htray
# create date: 2023/3/12

"""
PAT 乙级 1029
"""

if __name__ == '__main__':
    statement1 = input()
    statement2 = input()

    got_dict = {}

    statement1 = statement1.upper()
    statement2 = statement2.upper()
    for c in statement1:
        if c not in got_dict:
            if c not in statement2:
                got_dict[c] = True
                print(c, end='')