Help me in solving WATERFILLING problem

My issue

My code

# cook your dish here
t= int(input())
for i in range (t):
    if (B1==0 and B2==0) or(B1==0 and B3==0)or(B2==0 and B1==0)or(B2==0 and B3==0)or(B3==0 and B1==0)or(B3==0 and B2==0):
        print("Water filling time")
        print("Not now")

Problem Link: WATERFILLING Problem - CodeChef

Hi my old friend :smile:. The condition you have given is correct but you gave one condition 2 times for example you checked
(B1==0 and B3==0) or (B3==0 and B1==0) … If you write any of them the code will still work . My code is working and i put this in my code
(B1==1 and B2==1) or (B2==1 and B3==1) or (B1==1 and B3==1):