# 只完成了前两个任务
uppercase = [x for x in "QWERTYUIOPASDFGHJKLZXCVBNM"]
lowercase = [x for x in "qwertyuiopasdfghjklzxcvbnm"]
n = int(input())
flag = [1] * n
for i in range(n):
left, right = input().split("=")
left = [x for x in left]
right = [x for x in right]
for x in left:
if x in uppercase or x in lowercase:
if x not in right or left.count(x) != right.count(x):
flag[i] = 0
for x in flag:
if x == 1:
print("Y")
else:
print("N")
CCF 201912-3 Python 20分
最新推荐文章于 2024-11-03 17:39:57 发布