summaryrefslogtreecommitdiff
path: root/progs/a779.py
blob: 6c95c23eaa84b5e63b4b67c64473b0156ebb8a09 (plain)
1
2
3
4
5
6
7
8
MAX = 1000000
def breakSum(n): 
	dp = [0]*(n+1) 
	dp[0] = 0
	dp[1] = 1
	for i in range(2, n+1): 
		dp[i] = max(dp[int(i/2)] + dp[int(i/3)] + dp[int(i/4)], i); 
	return dp[n]