result =0
for i in range(n):
data = list(map(int,input().split()))
mini = min(data)
result = max(result,mini)
I understand that you will receive a value in the list type of data until i becomes n.
However, mini = min(data)
If this is the case
After receiving it once, store the smallest value in mini.
result = max(result,mini)
< The value currently contained here is the smaller of the first input, so one will be stored.
After that, if you receive it, isn't it going to be overwritten on the data that you received at first?
If so, the mini value will also be saved.
In result
, in what form has it been stored, can you remember the largest value?
3 1 2
4 1 4
2 2 2
For example, if you input it like this, first 1 and then 1 and then 2 would go to the mini value I don't really understand after that.
python
© 2024 OneMinuteCode. All rights reserved.