Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 1131cca

Browse files
committed
964 accepted.
1 parent 415192e commit 1131cca

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Algorithms/0964.least-operators-to-express-number/least-operators-to-express-number.go

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ func helper(x, target, count int, res *int) {
4848
}
4949

5050
intRoot = max(intRoot, 1)
51-
5251
helper(x, target-base, count+intRoot, res)
5352
if base*x-target < target {
5453
helper(x, base*x-target, count+intRoot+1, res)

Algorithms/0964.least-operators-to-express-number/least-operators-to-express-number_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ var tcs = []struct {
1313
ans int
1414
}{
1515

16+
{
17+
3,
18+
55125018,
19+
105,
20+
},
21+
1622
{
1723
30,
1824
281347,

0 commit comments

Comments
 (0)