May 18, 2025

LeetCode Contest 450

欢迎大家加QQ群:623375442。今天的题目不算是很难。 100668. Smallest Index With Digit Sum Equal to Index 给你一个整数数组 nums 。 返回满足 nums 的数位和(每一位数字相加求和)等于 i 的 最小 下标 i 。 如果不存在满足要求的下标,返回 -1 。 测试样例: 输入:nums = 输出:2 解释:nums…