#27611: 請問這python程式碼哪裡出錯?


carter921105@gmail.com (Ted Carter)


while True:
    try:
        x=0
        for n in range(int(input())):
            a0,b0,c0,d0,e0,f0,g0=map(int,input().split())
            a1,b1,c1,d1,e1,f1,g1=map(int,input().split())
           
            if(b0==d0) or (b0!=f0) or (b1==d1) or (b1!=f1):
                print('A', end='')
                x=x+1
       
            if(g0==0) or (g1==1):
                print('B', end='')
                x=x+1
       
            if(b0==b1) or (d0==d1) or (f0==f1):
                print('C', end='')
                x=x+1
       
            if(x==0):
                print('None',end='')
   
            print()

    except EOFError:
        break
#27612: Re:請問這python程式碼哪裡出錯?


asnewchien@gmail.com (david)


x = 0 的位置。

#27620: Re:請問這python程式碼哪裡出錯?


carter921105@gmail.com (Ted Carter)


謝謝你!

 

while True:

    try:

        for n in range(int(input())):

            a0,b0,c0,d0,e0,f0,g0=map(int,input().split())

            a1,b1,c1,d1,e1,f1,g1=map(int,input().split())

            

            x=0

            

            if(b0==d0) or (b0!=f0) or (b1==d1) or (b1!=f1):

                print('A', end='')

                x=x+1

        

            if(g0==0) or (g1==1):

                print('B', end='')

                x=x+1

        

            if(b0==b1) or (d0==d1) or (f0==f1):

                print('C', end='')

                x=x+1

        

            if(x==0):

                print('None',end='')

    

            print()

 

    except EOFError:

        break