#1528: use python small


1551946-5@g.puiching.edu.mo (S1B37錢經天)

School : No School
ID : 2372
IP address : [192.168.120.33]
Last Login :
2024-07-11 00:57:08
a009. 沒有手機的下課時間 -- 板橋高中教學題 | From: [192.168.120.33] | Post Date : 2024-05-06 20:31

ans = input()

gtimes = int(input())

for i in range(gtimes):

    a = 0

    b = 0

    gans = input()

    for j in range(4):

        if ans[j] == gans[j]:

            a+=1

        elif gans[j] in ans:

            b+=1

    print(str(a)+'A'+str(b)+'B')

 
ZeroJudge Forum