Skip to content

Commit

Permalink
fix: code
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Oct 31, 2023
1 parent babd4e5 commit 791552d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ public:
func minIncrementOperations(nums []int, k int) int64 {
var f, g, h int
for _, x := range nums {
f, g, h = g, h, min(min(f, g), h)+max(k-x, 0)
f, g, h = g, h, min(f, g, h)+max(k-x, 0)
}
return int64(min(min(f, g), h))
return int64(min(f, g, h))
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ public:
func minIncrementOperations(nums []int, k int) int64 {
var f, g, h int
for _, x := range nums {
f, g, h = g, h, min(min(f, g), h)+max(k-x, 0)
f, g, h = g, h, min(f, g, h)+max(k-x, 0)
}
return int64(min(min(f, g), h))
return int64(min(f, g, h))
}
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
func minIncrementOperations(nums []int, k int) int64 {
var f, g, h int
for _, x := range nums {
f, g, h = g, h, min(min(f, g), h)+max(k-x, 0)
f, g, h = g, h, min(f, g, h)+max(k-x, 0)
}
return int64(min(min(f, g), h))
return int64(min(f, g, h))
}

0 comments on commit 791552d

Please sign in to comment.