← 返回 google 的题目列表Calculate Total Score with Points and Adjacent 'T's Bonus
类型:online_judge
google
Given an integer array points and a string tokens composed of characters. Each 'T' in the string corresponds to a valid score in points. Additionally, each pair of adjacent 'T's can add an extra point. Calculate the total score.
Example
Input
[1, 2, 3, 4, 5]
TFTTT