注意这个东西是对称的,因此只有搜到两个才算。
a=int(input()) b=input() c=input() f=0 p=0 for i in range(0,a): for j in range(0,a): if(b[i]==b[j] and c[i]==c[j] and i!=j and b[i]!=c[j] and c[i]!=b[j]): p+=1 if(p==2): print("yes") else : print("no")
注册一个 TZHSOJ 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 TZHSOJ 通用账户