TOPIC

Wrong answer (55%)

jasfilho2 asked 3 years ago

n = int(input())

if(n>=1 and n<=20):
  for i in range (n):
    x = input().split()
    a1,b1,c1,a2,b2,c2 = x
    a1 = int(a1)
    b1 = int(b1)
    c1 = int(c1)
    a2 = int(a2)
    b2 = int(b2)
    c2 = int(c2)

    if (a1 < a2 and a1 < b2) :
      print ("1")
    elif  (b1 < a2 and b1 < b2):
        print('1')
    elif c1 < a2 and c1 < b2:
        print('1')

    elif (b1 > b2 and a1 < a2):         
      print("2")

    elif (a1 < a2 and b1 < b2 and c1 < c2):
      print ("3")

    elif (a1 > a2 and b1 > b2  and c1 > c2 ):
      print ("3")

    else:
      print ("0")

Remember not post solutions. Your post may be reviewed by our moderators.

  • EsraelSousa-IFCE_TIANGUA replied 3 years ago

    É bom testar isso no início não?

    elif (a1 < a2 and b1 < b2 and c1 < c2):
          print ("3")
    
        elif (a1 > a2 and b1 > b2  and c1 > c2 ):
          print ("3")
    

    Você tbm pode utilizar o Udebug pra testar: https://www.udebug.com/URI/3005

  • jasfilho2 replied 3 years ago

    consegui resolver ela aqui

  • jasfilho2 replied 3 years ago

    para mim aqui esta fora dor ar www.udebug.com/URI/3005 mas qundo coloquei as condições no inicio deu 1 em vez de 3 sei que para essa condição um vai ficar em cima do outro com forme o tamanho