The official statement of a problem is always the one in the PDF document. The HTML version of the statement is also given to help you, but may contain some content that is not well displayed. In case of doubt, always use the PDF.
Input
4 5 5 73 54 80 45 73 37 63 54 54 18 97 37 80 80 97 27 45 97 18 18 45 45 18 45 97
Output
10 16 18 16 10 16 25 28 25 16 18 28 32 28 18 15 24 27 24 15 9 15 17 15 10