hackerrank.com

Practice>Python>Built-Ins>Any or All

건이두 2019. 3. 27. 13:04
728x90

hackerrank.com

Any or All

Problem Link : https://www.hackerrank.com/challenges/any-or-all/problem

Difficulty : Easy


Tip

  • how to check the number is palindromic
  • Please use ::-1, it make reverse array
  • palindromic number means that original and reverse are same
  • v == v[::-1] <- this is a key
  • we can use single line loop as parameter for any() and all()
  • any(v > 0 for v in N1)

Solution



728x90