Sort by

recency

|

765 Discussions

|

  • + 0 comments
    n = int(input())
    lst = list(map(int, input().split()))
    res = False
    count = 0
    for i in range(len(lst)):
        if lst[i] > 0:
            count+=1
            if str(lst[i]) == str(lst[i])[::-1]:
                res = True
                
    if count== len(lst) and res:
        print("True")
    else:
        print("False")
    
  • + 0 comments
    n = int(input())
    nums = list(map(int, input().split(' ')))
    print((all(x > 0 for x in nums) and (any(str(x) == str(x)[::-1] for x in nums))))
    
  • + 0 comments

    For Python3 Platform

    Completed in 3 lines ignoring the space between inputs and print statement. It also can be done in two lines writing all the inputs in a single line

    N = int(input())
    nums = input().split()
    
    print(all(int(i)>0 for i in nums) and any(c==c[::-1] for c in nums))
    
  • + 0 comments

    l=[5] m=[12,9,61,5,14] print(any([l,m]))

  • + 0 comments

    two lines:

    inp,li = int(input()), input().split()
    print(all(int(i) >0 for i in li)and any(j == j[::-1] for j in li))