We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 569fd86 commit 3d34af9Copy full SHA for 3d34af9
exercises/practice/grains/.meta/example.vim
@@ -8,7 +8,7 @@ function! StringAdd(a, b) abort
8
let carry = 0
9
10
for i in range(len - 1, 0, -1)
11
- let c = carry + a->strpart(i, 1)->str2nr() + b->strpart(i, 1)->str2nr()
+ let c = carry + (a->strpart(i, 1)->str2nr()) + (b->strpart(i, 1)->str2nr())
12
let result = $"{c % 10}{result}"
13
let carry = c / 10
14
endfor
0 commit comments