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
577 PHP ssh2_scp_send fails to send files as intended
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
599 GDB gets version error when attempting to debug with the Presense SDK (IDE)
887 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.