-->
当前位置:首页 > 题库

PROGRAMMING:Part 1: Max line

Luz5年前 (2021-05-10)题库461
Youyou Xuejie is very distressed. Because the adventure team of "youyou Xuejie team" encountered difficulties at the beginning of the adventure. The first pass was "Shimen Max line", and one of the doors read:
six
1,3,5,23,6,8,14
20,22,13,4,16
23,12,17,22
2,6,10,9,3,6
22,21,20,8,10
22,1,23,6,8,19,23
There are two words on the stone gate, Max, line. In other words, the secret to open the stone gate is to find Max and output line. Obviously, the topic is not difficult, but the problem is that not every stone gate has only 6 rows of numbers, the number of rows is n (0 < n < = 30), and each row of numbers does not exceed 20 positive integers.
###Input format:
There are multiple sets of test data. The first line n of each group of data means that there are n lines below, 2 to N + 1 lines contain a certain number of numbers (no more than 20), and there is a comma between each two numbers.
###Output format:
The first line: the largest integer;
The second line: the line number of the largest integer, separated by commas
###Input example:
Here is a set of inputs. For example:
```in
six
1,3,5,23,6,8,14
20,22,13,4,16
23,12,17,22
2,6,10,9,3,6
22,21,20,8,10
22,1,23,6,8,19,23
```
###Output example:
The corresponding output is given here. For example:
```out
twenty-three
1,3,6
```







answer:If there is no answer, please comment