26(17) РТ

 avatar
user_8840555
python
a year ago
363 B
0
Indexable
Never
f = open(r'C:\Users\SnowDrit\Downloads\26(1)\26.17.txt')  # на 2 балла
n = int(f.readline())
tovari = []
tovari80 = []
for s in f:
    tovari.append(int(s))
    if int(s) > 80:
        tovari80.append(int(s))
tovari80.sort()
skidka = sum(tovari80[:len(tovari80) // 2]) * 0.45
print(sum(tovari) - skidka)
print(max(tovari80[:len(tovari80) // 2]))