cswork / OA打开练习工作台

MicrosoftOA #22

Find Max Sum with Same First and Last Digit

估计简单评测数据准备中,可先阅读题面

考点(AI 标注)哈希计数

(no statement available)

Example 1

Input:

nums = [2, 36, 45, 306, 415]

Output:

460

Explanation: The maximum sum of any 2 numbers whose first and last digits match is obtained by adding 45 and 415, which gives us 460.