← Back to List

24198번: Muffinspelet ↗

Solutions

Python 3
124 B | 124 chars
l = [0, 0]
n = int(input())

turn = 1
while n > 0:
  l[turn] += n // 2 + n % 2 
  n = n // 2
  
  turn = 1 - turn

print(*l)