[Jagl][1] - 18 or 19 bytes ==== ***18 bytes*** (input is on top of stack, and output is all that is left on stack): dqZ*S1 5r]%{U*}/b+ ***19 bytes***, (input is on top of stack, output is printed): dqZ*S1 5r]%{U*}/b+P Waiting for a response from the original poster about the output format. Since input is specified as *"whatever you like"*, I am going to assume that my input can be an array on the top of the stack. Explanation: dqZ* Duplicate, get minimum, and multiply that by 10 S1 5r] Swap (so array is on top), push range 1-5 exclusive, and rotate %{U*}/ Zip arrays together, and multiply each pair b+P Get the sum of that, add the common minimum, and print [1]:http://github.com/globby/jagl