ostapdontstop

blyaaa

Nov 8th, 2020
639
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. file = open("input.txt", "r")
  2.  
  3. students = []
  4.  
  5. for line in file:
  6.     students.append(line.split())
  7.  
  8.  
  9. max_i = 0;
  10. for i in range(len(students)):
  11.     sum = int(students[i][3]) + int(students[i][4]) + int(students[i][5])
  12.     students[i].append(sum)
  13.  
  14.     if students[i][6] > sum:
  15.         max_i = i
  16.  
  17.  
  18. print("Больше всего баллов у:", students[max_i][0], students[max_i][1], students[max_i][2])
  19.  
RAW Paste Data