11 lines
297 B
Python
Executable File
11 lines
297 B
Python
Executable File
with open("d.txt", "r") as file:
|
|
maxX = 0
|
|
minX = int(file.readline().replace("\n", ""))
|
|
for x in file:
|
|
x = int(x.replace("\n", ""))
|
|
if maxX < x:
|
|
maxX = x
|
|
if minX > x:
|
|
minX = x
|
|
|
|
print(f"max: {maxX}, min: {minX}, calculate: {maxX - minX}") |