IMPC17 Prep Contest |
Start: Apr.22.2017 at 02:00:00 PM
Finish: Apr.22.2017 at 07:00:00 PM
The contest is finished!
• Contest scoreboard
|
Feedback | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
We all know how to write the zip code on an envelope.
The rules for recording these figures are given below.
The numbers in the number record are separated from each
other by a single space bar. Your task is to recognize the
number written by asterisks according to the "postal rules"
and output the maximum number of this number to the output
file.
Analyze the number on the input and output
the maximum number of this number.
Input Specification:
Starting with the first line, the numbers in the analyzed
number are written. Number of digits: 1 ≤ n ≤ 10.
Each digit occupies 5 columns. Figures are separated from each
other by a column of spaces. The last character in each
line is a period. Thus, the number in the file occupies 9
equal in length lines, each of which contains asterisks,
spaces and a dot at the end. The length of each line is 6 * n.
Output Specification:
Output one decimal digit: max digit.
Sample Input
|
***** * * ***** *.
* * * * * .
* * * * * .
* * * * * .
***** ***** ***** *****.
* * * * *.
* * * * *.
* * * * *.
* * ***** *****.
|
Sample Output
|
6
|
Для отправки решений необходимо выполнить вход.
|