Retina, 30 bytes
.(?<=(2円*(.))+)
$.($#1*$>:&*)
Try it online! Link includes test cases. Explanation: Uses @Arnauld's(削除) @Arnauld's (削除ここまで) @LuisfelipeDejesusMunoz's observation that the partial score is the product of the letter's index and the number of runs so far.
.(?<=(2円*(.))+)
For each letter, count the number of runs so far.
$.($#1*$>:&*)
Replace it with the product of that with the letter's 1-based index.
Retina, 30 bytes
.(?<=(2円*(.))+)
$.($#1*$>:&*)
Try it online! Link includes test cases. Explanation: Uses @Arnauld's observation that the partial score is the product of the letter's index and the number of runs so far.
.(?<=(2円*(.))+)
For each letter, count the number of runs so far.
$.($#1*$>:&*)
Replace it with the product of that with the letter's 1-based index.
Retina, 30 bytes
.(?<=(2円*(.))+)
$.($#1*$>:&*)
Try it online! Link includes test cases. Explanation: Uses (削除) @Arnauld's (削除ここまで) @LuisfelipeDejesusMunoz's observation that the partial score is the product of the letter's index and the number of runs so far.
.(?<=(2円*(.))+)
For each letter, count the number of runs so far.
$.($#1*$>:&*)
Replace it with the product of that with the letter's 1-based index.
Retina, 30 bytes
.(?<=(2円*(.))+)
$.($#1*$>:&*)
Try it online! Link includes test cases. Explanation: Uses @Arnauld's observation that the partial score is the product of the letter's index and the number of runs so far.
.(?<=(2円*(.))+)
For each letter, count the number of runs so far.
$.($#1*$>:&*)
Replace it with the product of that with the letter's 1-based index.