{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"livecodebench","formal_name":"LiveCodeBench","introduction":"LiveCodeBench continuously collects new competitive-programming problems to evaluate coding capabilities. Its initial release_v1 contains 400 problems, with source platform, contest date, and dataset version tracked explicitly.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://livecodebench.github.io/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"c54ee5b8-e626-5c3a-993b-aaa089df4ebd","task_key":"release~5fv1--test--2844","task_revision_id":"2","upstream_id":"2844","short_description":"sum-of-squares-of-special-elements","config":"release_v1","split":"test","body":"{\"contest_date\":\"2023-07-16T00:00:00\",\"contest_id\":\"weekly-contest-354\",\"difficulty\":\"easy\",\"platform\":\"leetcode\",\"question_content\":\"You are given a 1-indexed integer array nums of length n.\\nAn element nums[i] of nums is called special if i divides n, i.e. n % i == 0.\\nReturn the sum of the squares of all special elements of nums.\\n \\nExample 1:\\n\\nInput: nums = [1,2,3,4]\\nOutput: 21\\nExplanation: There are exactly 3 special elements in nums: nums[1] since 1 divides 4, nums[2] since 2 divides 4, and nums[4] since 4 divides 4. \\nHence, the sum of the squares of all special elements of nums is nums[1] * nums[1] + nums[2] * nums[2] + nums[4] * nums[4] = 1 * 1 + 2 * 2 + 4 * 4 = 21.  \\n\\nExample 2:\\n\\nInput: nums = [2,7,1,19,18,3]\\nOutput: 63\\nExplanation: There are exactly 4 special elements in nums: nums[1] since 1 divides 6, nums[2] since 2 divides 6, nums[3] since 3 divides 6, and nums[6] since 6 divides 6. \\nHence, the sum of the squares of all special elements of nums is nums[1] * nums[1] + nums[2] * nums[2] + nums[3] * nums[3] + nums[6] * nums[6] = 2 * 2 + 7 * 7 + 1 * 1 + 3 * 3 = 63. \\n\\n \\nConstraints:\\n\\n1 <= nums.length == n <= 50\\n1 <= nums[i] <= 50\",\"question_title\":\"sum-of-squares-of-special-elements\",\"starter_code\":\"class Solution:\\n    def sumOfSquares(self, nums: List[int]) -> int:\\n        \"}","display_format":"text","language":"","answer_status":"external_grader","assets":[],"source_url":"https://livecodebench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}