Files
pythonmc/levieProekti/Olymp2020/IschoOdnaOlymp2020/Mult2020.py
BarsTiger 68fb5410ee 1
2021-10-15 12:46:53 +03:00

23 lines
620 B
Python

iznchislo, kolvopodelit = input().split()
iznchislo = int(iznchislo)
kolvopodelit = int(kolvopodelit)
chislo = iznchislo
summaitely = []
maxinsummately = 0
if iznchislo == kolvopodelit:
for i in range(kolvopodelit):
summaitely.append(1)
else:
for yey in range(kolvopodelit):
chislo = chislo // 2 + chislo % 2
summaitely.append(chislo)
if chislo == 0:
if yey == 0:
maxinsummately = chislo
summaitely.append(maxinsummately - 1)
summaitely.remove(maxinsummately)
maxinsummately = maxinsummately - 1
print(summaitely)