Length of firstname is numbered from 0 in random tests.
But description says count from 1.
Length of PAUL is 4 not 3.
It's not a problem with sample tests. But a big problem with random tests.
Here small example. st = "Matthew,John,Bob" we = [16, 33, 70]
If length is numbered from 0. John = 1683 Matthew = 1552 Bob = 1540
If length is numbered from 1. John = 1716 Bob = 1610 Matthew = 1568
Best C# solutions calcs the score with length which numbered from 0.
Fixed.
assert_eq!(actual, expected)
Only during the first call. The tests are always the same.
I've forked Rust Translation with real random tests.
https://github.com/Codewars/codewars.com/issues/556
Crate Random is available now.
No random tests for Rust.
Is done.
Now it works.
I've added the random tests. But rand methods not works on codewars. It's a draft now.
Sorry. My mistake.
Length of firstname is numbered from 0 in random tests.
But description says count from 1.
Length of PAUL is 4 not 3.
It's not a problem with sample tests. But a big problem with random tests.
Here small example.
st = "Matthew,John,Bob"
we = [16, 33, 70]
If length is numbered from 0.
John = 1683
Matthew = 1552
Bob = 1540
If length is numbered from 1.
John = 1716
Bob = 1610
Matthew = 1568
Best C# solutions calcs the score with length which numbered from 0.
0.000001
.The length of the firstname is added to the sum of these ranks hence a number
n
.PAUL -> n = length of firstname + 16 + 1 + 21 + 12 = 4 + 50 -> 54
length of firstname
= 4 not 3And random tests will fail (e.g. C#).
Because ranks are numbered from 0 in tests solution.
This contradicts to the condition.
Thank you.
Thank you
Sample tests have an issue in C#
MaxPossibleScore(new Dictionary<string, int> { {"a", 1} }, new string[] {}))
But string needs to change to object.