Advertisement
T-D-K

Untitled

May 17th, 2018
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. m,n = map(int, input().split())
  2. s = 0
  3. for i in range(m):
  4.     r = input().split()
  5.     for j in range(n):
  6.         c = r[j]
  7.         if c[len(c) - 1] == '6':
  8.             s = s + int(c)
  9. print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement