Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //p1
- m,n = map(int, input().split())
- s = 1
- 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)
- //p2
- m, n = map(int, input().split())
- for i in range(m):
- r = list(map(int, input().split()))
- m = 0
- for j in range(n):
- if r[j] > 0:
- if m == 0:
- m = r[j]
- else:
- m = min(r[j], m)
- print(m)
- //p3
- m, n = map(int, input().split())
- a = []
- for i in range(m):
- a.append(list(map(int, input().split())))
- s = 0
- for j in range(n):
- for i in range(m):
- if a[i][j] != 7:
- break
- else:
- s = s + 1
- print(s)
- //p4
- m, n = map(int, input().split())
- a = 0
- ai = 0
- for i in range(n):
- q = list(map(int, input().split()))
- s = 0
- for j in range(m):
- s = s + q[j]
- if s > a:
- a = s
- ai = i
- print(str(a)+" "+str(ai))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement