SHARE
TWEET

lea zdk 7

a guest Dec 9th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. m = int(input())
  2. n = int(input())
  3. ll = []
  4. for i in range(m):
  5.   l = []
  6.   for j in range(n):
  7.     broj = int(input())
  8.     l.append(broj)
  9.   ll.append(l)
  10.  
  11. najveci = ll[0][0]
  12. for i in range(m):
  13.   red_najveci = ll[i][0]
  14.   for j in range(n):
  15.     if ll[i][j] > najveci:
  16.       najveci = ll[i][j]
  17.     if ll[i][j] > red_najveci:
  18.       red_najveci = ll[i][j]
  19.   print (red_najveci)
  20.  
  21. print(najveci)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top