leetcode-cli icon indicating copy to clipboard operation
leetcode-cli copied to clipboard

Error decoding response body

Open LegendaryPredz opened this issue 2 years ago • 3 comments

~ leetcode test 1
[INFO  leetcode_cli::plugins::leetcode] Sending code to judge...
error: error decoding response body: expected value at line 2 column 1, please try again

LegendaryPredz avatar Oct 16 '22 08:10 LegendaryPredz

Can you offer your problem 1 code ?

wendajiang avatar Dec 12 '22 15:12 wendajiang

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        map = {}
        for i in range(len(nums)):
            if nums[i] not in map:
                map[target - nums[i]] = i + 1 
            else:
                return [map[nums[i]], i + 1]
            return -1, -1

LegendaryPredz avatar Dec 16 '22 00:12 LegendaryPredz

You can try using the newest version. I can not reproduct the error.

wendajiang avatar Dec 16 '22 05:12 wendajiang