← 返回 uber 的题目列表Jump Game on an Array
类型:online_judge
You are given an integer array and start at the first element. Your goal is to reach the last element of the array. \n \n You can jump according to the following rules:\n - Jump to the next position (i+1)\n - Jump to a position whose unit digit is 3 (e.g., 3, 13, 23, ...) \n \n Each position has a score. Find the maximum score achievable from the start to the end of the array such that you end at the last element of the array.
Example
Input
[1,2,3,0,4,6,3,2,0,5]
Output
12