Generation

generate functionTue, 22 Nov 2022

given an integer remainder, distributed to the values 5, 10 and 20

def ditribute(remainder) [5, 10, 20].map { |b| [b, remainder / b] }.to_h end

Questions about programming?Chat with your personal AI assistant