Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = []
- for i in range(1, int(input()) + 1):
- id = "TS"
- if i < 10:
- id += "0"
- id += str(i)
- name = input()
- d1 = float(input())
- if d1 > 10:
- d1 /= 10
- d2 = float(input())
- if d2 > 10:
- d2 /= 10
- aver = (d1 + d2) / 2
- status = ""
- if aver < 5:
- status = "TRUOT"
- elif aver < 8:
- status = "CAN NHAC"
- elif aver <= 9.5:
- status = "DAT"
- else:
- status = "XUAT SAC"
- a.append([id, name, aver, status])
- a.sort(key = lambda x: (-x[2], int(x[0][2:]), x[1]))
- for i in a:
- print(i[0], i[1], round(i[2], 2), i[3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement