Many players and a leaderboard (Quiz App)
Now several people play. Each answer line is <player <question number <letter <seconds. Score them as before (time limit, speed bonus, points). A player answering the same question twice prints <player: already answered <n (the first answer counts); an unknown question <player: no question <n; a malformed line bad answer line. Then print leaderboard: and <rank. <player <points points (<right/<questions correct, <total secondss) sorted by points (high first), then total seconds (low first), then name.
Input: The quiz, ---, answer lines.
Output: Error lines while reading, then the leaderboard.
Difficulty: Medium. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Keep per-player totals in a map.