python/24-6-29-2.py

37 lines
659 B
Python
Raw Normal View History

2024-07-22 16:59:27 +08:00
n=int(input())
b="CCCCCCCCCC"
c=""
d=0
e=[]
f=[]
g=[]
o=[]
for i in range(n):
e.append(input())
for l in range(len(e)):
h=e[l]
if len(e[l])==len(b):#写的答案个数是否等于标准答案个数
for j in range(len(b)):#判断答案并计分
m=h[j]
if h[j]==b[j]:
c=c+b[j]
d=d+10
else:
c=c+"X"
f.append(d)
f.append(c)
else:
f.append(" ")
p=f[len(f)-2]
q=f[len(f)-1]
f.clear()
f.append(p)
f.append(q)
o=f.copy()
g.append(o)
f.clear()
c=""
d=0
for i in range(n):
print(g[i])