Sort by

recency

|

766 Discussions

|

  • + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    n = input()
    l = input().split(' ')
    print(all([int(a) > 0 for a in l]) and any([int(a) == int(str(a)[::-1]) for a in l]))
    
  • + 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]))