消息推送Leetcode每日一题 —— 2913. 子数组不同元素数目的平方和 I09:30 · 2026年10月15日 · 周四Leetcode每日一题 —— 2913. 子数组不同元素数目的平方和 I🌐 链接: https://linux.do/t/topic/3025712🏷️ 分组: LinuxDo论坛🕒 时间: 2026-10-15 09:26:44 LINUX DO Leetcode每日一题 —— 2913. 子数组不同元素数目的平方和 I 思路 简单题简单做,剩下的交给明天。 直接模拟即可。 代码 class Solution { public int sumCounts(List<Integer> nums) { int n = nums.size(); HashSet<Integer> set = new HashSet<>(); int ans = 0; for (int i = 0; i < n; i++) { set.clear();… 09:30 · 2026年10月15日 · 周四