Skip to content

Instantly share code, notes, and snippets.

@LiLingOff
Created May 1, 2025 14:35
Show Gist options
  • Save LiLingOff/6cec8d2e3d83b5d617f72385920433d2 to your computer and use it in GitHub Desktop.
Save LiLingOff/6cec8d2e3d83b5d617f72385920433d2 to your computer and use it in GitHub Desktop.
TOI 2504 Examination
scores = list(map(int, input().split()))
standards = list(list(map(int, input().split())) for _ in range(6))
for i in range(6):
n, s = scores[i], standards[i]
if n == 0:
print("X")
elif n < s[4]:
print("F")
elif n < s[3]:
print("E")
elif n < s[2]:
print("D")
elif n < s[1]:
print("C")
elif n < s[0]:
print("B")
else:
print("A")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment