diff --git a/main.go b/main.go index 983009e..10c186f 100644 --- a/main.go +++ b/main.go @@ -33,14 +33,14 @@ func (l *ListNode) Get(index int) (int, error) { } func (l *ListNode) GetNr() int { res := 0 - multiplyer := 1 + multiplier := 1 current := l for current.Next != nil { - res = res + (current.Val * multiplyer) - multiplyer = multiplyer * 10 + res = res + (current.Val * multiplier) + multiplier = multiplier * 10 current = current.Next } - res = res + (current.Val * multiplyer) + res = res + (current.Val * multiplier) return res } func (l *ListNode) Length() int {