力扣 Line 15: Char 54: runtime error: signed integer overflow: 2000000000 + 1000000000 cannot be represented in type 'int'

int 超了,数据是四个1000000000相加,将int改为double

double  tmp=((double)nums[i]+nums[j]+nums[l]+nums[r]);
double先强转
posted @ 2022-01-20 17:16  付玬熙  阅读(1663)  评论(1编辑  收藏  举报