Skip to content

Commit 2a4625a

Browse files
authored
Improved task 3729
1 parent af24ba5 commit 2a4625a

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/g3701_3800/s3729_count_distinct_subarrays_divisible_by_k_in_sorted_array

1 file changed

+1
-1
lines changed

src/main/kotlin/g3701_3800/s3729_count_distinct_subarrays_divisible_by_k_in_sorted_array/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Solution {
1515
if (i > 0 && x != nums[i - 1]) {
1616
var s = sum
1717
for (t in i - lastStart downTo 1) {
18-
cnt.merge((s % k).toInt(), 1) { a: Int?, b: Int? -> Integer.sum(a!!, b!!) }
18+
cnt.merge((s % k).toInt(), 1) { a: Int, b: Int -> Integer.sum(a, b) }
1919
s -= nums[i - 1].toLong()
2020
}
2121
lastStart = i

0 commit comments

Comments
 (0)