In this

**HackerEarth Divisibility problem solution,**you are provided an array A of size N that contains non-negative integers. Your task is to determine whether the number that is formed by selecting the last digit of all the N numbers is divisible by 10. Note: View the sample explanation section for more clarification.## HackerEarth Divisibility problem solution.

print(("No","Yes")[(input()+input())[-1:]=='0'])

### second solution

n = int(input())

assert(n>=1 and n<=10**5)

ar = [i for i in map(int, input().split())]

for x in ar:

assert(x>=0 and x<=10**5)

print(("No", "Yes")[ar[-1]%10==0])

## 0 Comments