fork download
  1. def regularize(x,y):
  2. tmp=(x+y+abs(x-y))/2
  3. y=tmp-abs(x-y)
  4. x=tmp
  5. return x, y
  6.  
  7. a, b, c = list(map(int, input().split()))
  8. a, b = regularize(a,b)
  9. b, c = regularize(b,c)
  10. a, b = regularize(a,b)
  11. print(*list(map(int, [a, b, c])))
Success #stdin #stdout 0s 28384KB
stdin
7 34 1
stdout
34 7 1