Address review comments

This commit is contained in:
Jeroen Ketema
2022-02-03 12:09:18 +01:00
parent 4d03082f16
commit 0b9b6d7b98
3 changed files with 11 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ bindingset[input]
int parseOctal(string input) {
input.regexpMatch("0[0-7]+") and
result =
sum(int ix |
strictsum(int ix |
ix in [1 .. input.length()]
|
8.pow(input.length() - (ix + 1)) * input.charAt(ix).toInt()