Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m,n = map(int, input().split())
- s = 0
- for i in range(m):
- r = input().split()
- for j in range(n):
- c = r[j]
- if c[len(c) - 1] == '6':
- s = s + int(c)
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement