I understand that you will receive a value in the list type of data until i becomes n.
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.
result, in what form has it been stored, can you remember the largest value?
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
© 2022 pinfo. All rights reserved.