scala oneliner
\nobject Solution {\n  def minElements(nums: Array[Int], limit: Int, goal: Int): Int =\n    (((goal - nums.foldLeft(0L)(_ + _)).abs + limit - 1) / limit).toInt\
```\nobject Solution {\n  def minElements(nums: Array[Int], limit: Int, goal: Int): Int =\n    (((goal - nums.foldLeft(0L)(_ + _)).abs + limit - 1) / limit).toInt\n}\n```
['Scala']