Skip to content

Instantly share code, notes, and snippets.

@daduam
Last active July 7, 2021 17:43
Show Gist options
  • Save daduam/8f730996a0f54e1af6153b8a88f8c627 to your computer and use it in GitHub Desktop.
Save daduam/8f730996a0f54e1af6153b8a88f8c627 to your computer and use it in GitHub Desktop.
correct = list(input().split())
grades = dict()
while True:
temp = list(input().split())
id = temp[0]
if id == "999":
break
answer = temp[1:]
grade = 0
for i in range(len(correct)):
if answer[i] == "x":
continue
grade += 1 if answer[i] == correct[i] else -1
grades[id] = grade
for key, value in grades.items():
print("{} {} marks".format(key, value))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment