Evenly distribute number into array of n elements with equal values

前端 未结 0 1771
抹茶落季
抹茶落季 2020-12-17 02:39

I\'m trying to divide x into y parts and they should be as evenly as possible.

As an example: if x = 5 and y = 3

相关标签:
回答
  • 消灭零回复
提交回复
热议问题