type
status
date
slug
summary
tags
category
icon
password
题目:
给你一个 数字 字符串数组
nums
和一个 数字 字符串 target
,请你返回 nums[i] + nums[j]
(两个字符串连接)结果等于 target
的下标 (i, j)
(需满足 i != j
)的数目。来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/SNJvJP 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
示例 1:
示例 2:
示例 3:
思路:
- 暴力,遇到长度比target长的数直接跳过
代码:
结果:

image-20220328175128074