OpenCalculator

mail@pastecode.io avatar
unknown
python
7 months ago
491 B
0
Indexable
Never
def read_input():
    with open('input.txt', 'r') as input:
        s = input.readline()
        n = input.readline()
    return s, n

def write_output(ans):
    with open('output.txt', 'w') as output:
        output.write(str(ans))

def solution(s,n):
    ans = 0
    num, digs = set(), set()
    digs.update([int(x) for x in s.split(' ')])
    num.update([int(x) for x in n])
    ans = [x for x in num - digs]
    return len(ans)

s, n = read_input()
ans = solution(s, n)
write_output(ans)