Carson1

Untitled

Nov 13th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. N = int(input())
  2. k = int(input())
  3. f = []
  4.  
  5. for i in range(N):
  6.     f.append([])
  7.     f[i].append(int(input()))
  8.     f[i].append(int(input()))
  9. print(f)
  10.  
  11. for i in range(k * 2):
  12.     b = f.index(max(f))
  13.     c = f[b].index(max(f[b]))
  14.     del f[b][c]
  15.  
  16. print(f)
Advertisement
Add Comment
Please, Sign In to add comment