How do I return a subset with a sum closest to the integer 's' when the array does not add up to 's' in Python?

后端 未结 0 1462
执念已碎
执念已碎 2020-12-09 04:27

I\'m writing a function that takes an integer s and an array of positive integers A and returns an array consisting of elements of A which add up to s.

If there is no

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