为什么在力扣上运行出错

俺写的代码如下:

nums = eval(input())
l = eval(input())
r = eval(input())
class Solution:
    def checkArithmeticSubarrays(self, nums, l, r):
        none_list = []
        m = 0
        for i in range(0, len(l)):
            new_nums = nums[l[i]:r[i]+1]
            new_nums.sort()
            new = new_nums
            n = -2
            for j in range(0, len(new)):
                n += 1
                res = new[1+n] - new[n]
                if new[j] == new[0] + (j) * res:
                    if j == len(new)-1:
                        none_list.append('%s' % 'ture')
                else:
                    if j == len(new)-1:
                        none_list.append('%s' % 'false')
        for k in none_list:
            m += 1
            if m == len(none_list):
                print(k, end=']')
            elif 1 < m < len(none_list):
                print(k, end=',')
            else:
                print(f'[{k}', end=',')
x = Solution()
x.checkArithmeticSubarrays(nums, l, r)

题目如下:

img


测试用例如下:
[-12,-9,-3,-12,-6,15,20,-25,-20,-15,-10]
[0,1,6,4,8,7]
[4,4,9,7,9,10]
为什么在力扣上运行出错?我在pycharm运行上可以得出正确结果。

你不认真审题啊
看好输入格式了吗

exec(input().replace(',',';'))
nums=locals()['nums']
l =locals()['l']
r = locals()['r']
不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^