cswork / OA打开练习工作台

RobloxOA #8

Find Max Number of Pairs

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

考点(AI 标注)哈希计数位运算

Given an array, find the numbers with t

Example 1

Input:

nums = [1, 9, 23, 30, 54, 103]

Output:

4

Explanation: The possible pairs with the same number of digits are:

  • {1, 9}
  • {23, 30}
  • {23, 54} There are a total of 4 different pairs, so the output is 4.