示例
代码
# -*- coding: utf-8 -*-
A=1
B=1
C=1
A1=1
B1=1
C1=1
A2=1
B2=1
C2=1
A3=1
B3=1
C3=1
A4=1
B4=1
C4=1
def a(name,bianhao):name=name.encode('utf-8');global A,B,C,A1,B1,C1,A2,B2,C2,A3,B3,C3,A4,B4,C4if(name=='a'):if(bianhao==4):end="A"+str(A)A=A+1elif(bianhao==3):end="B"+str(B)B=B+1elif(bianhao==2):end="C"+str(C)C=C+1else:end="D"elif(name=='b'):if(bianhao==4):end="A"+str(A1)A1=A1+1elif(bianhao==3):end="B"+str(B1)B1=B1+1elif(bianhao==2):end="C"+str(C1)C1=C1+1else:end="D"elif(name=='c'):if(bianhao==4):end="A"+str(A2)A2=A2+1elif(bianhao==3):end="B"+str(B2)B2=B2+1elif(bianhao==2):end="C"+str(C2)C2=C2+1else:end="D"elif(name=='d'):if(bianhao==4):end="A"+str(A3)A3=A3+1elif(bianhao==3):end="B"+str(B3)B3=B3+1elif(bianhao==2):end="C"+str(C3)C3=C3+1else:end="D"elif(name=='e'):if(bianhao==4):end="A"+str(A4)A4=A4+1elif(bianhao==3):end="B"+str(B4)B4=B4+1elif(bianhao==2):end="C"+str(C4)C4=C4+1else:end="D"else:end="0"return end
结果