消息推送Leetcode每日一题 —— 2778. 特殊元素平方和08:45 · 2026年10月11日 · 周日Leetcode每日一题 —— 2778. 特殊元素平方和🌐 链接: https://linux.do/t/topic/3007056🏷️ 分组: LinuxDo论坛🕒 时间: 2026-10-11 08:42:40 LINUX DO Leetcode每日一题 —— 2778. 特殊元素平方和 思路 简单题简单做,直接模拟即可。 代码 class Solution { public int sumOfSquares(int[] nums) { int n = nums.length; int ans = 0; for (int i = 0; i < nums.length; i++) { if (n % (i + 1) == 0) { ans += nums[i] * nums[i];… 08:45 · 2026年10月11日 · 周日