Demo entry 6641239

python

   

Submitted by anonymous on Sep 17, 2017 at 07:50
Language: Python 3. Code size: 246 Bytes.

ans=0
        for i in range(len(nums)):
            for j in range(i+1,len(nums)+1):
                sum_1=0
                for k in range(i,j+1,1):
                    sum_1+=nums[k]
                ans=max(sum_1,ans)
        return ans

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).