A full timed mock contest spanning the book: eight problems in five milestones. Each problem reads the whole contest input from standard input and prints the exact output. Read the input in your program with:
import sys
data = sys.stdin.read()
Write each answer as a complete program in your notebook, and run it with piped input, for example python my_solution.py < case.txt. Do not call input(). The five milestones group the problems by the technique they reward; solve them in any order.