Sort by Multiplying
Jelly, 6 5 bytes
:‘×µ\
First Jelly answer before @Dennis wakes up and beats me. Try it online!
Explanation
: Integer division, m//n
‘ Increment, (m//n+1)
× Multiply, (m//n+1)*n
µ Turn the previous links into a new monadic chain
\ Accumulate on the array
Thanks to @Dennis for -1 byte.
JavaScript (ES6), 28
Edit As suggested by @Patrick Roberts, p
can be a uninitialized parameter. Same byte count but avoid using a global variable
(a,p)=>a.map(n=>p=n*-~(p/n))
TEST
f=(a,p)=>a.map(n=>p=n*-~(p/n))
console.log=x=>O.textContent+=x+'\n'
;[
[[9], [ 9]],
[[1, 2], [ 1, 2]],
[[2, 1], [ 2, 3]],
[[7, 3], [ 7, 9]],
[[1, 1, 1, 1], [ 1, 2, 3, 4]],
[[5, 4, 12, 1, 3], [ 5, 8, 12, 13, 15]],
[[3, 3, 3, 8, 16], [ 3, 6, 9, 16, 32]],
[[6, 5, 4, 3, 2, 1], [ 6, 10, 12, 15, 16, 17]],
[[9, 4, 6, 6, 5, 78, 12, 88], [ 9, 12, 18, 24, 25, 78, 84, 88]],
[[8, 9, 41, 5, 12, 3, 5, 6], [ 8, 9, 41, 45, 48, 51, 55, 60]],
[[15, 8, 12, 47, 22, 15, 4, 66, 72, 15, 3, 4], [ 15, 16, 24, 47, 66, 75, 76, 132, 144, 150, 153, 156]]
].forEach(t=>{
var i=t[0],k=t[1],r=f(i),ok=(k+'')==(r+'')
console.log(i + ' => ' + r + (ok?' OK':'FAIL expecting '+x))
})
<pre id=O></pre>
Python 2, 67 64 bytes
First try at code-golfing, so tips are appreciated.
def m(l):
for x in range(1,len(l)):l[x]*=l[x-1]/l[x]+1
print l