Subset Sum Problem DP HackerBlocks

In the standard DP subset sum problem , the time complexity is O(nsum) . But the subset sum problem on hackerblocks gives constraints as 1<=n<=5000 and 1<=sum <= 10^7 . So if i use DP in this program , the number of operations are of O( 5 10^10 ), which is more than 10^8 . How to solve it ?