You have about 35–45 minutes to solve six problems. 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().