You are provided with an input containing a number. Implement a solution to find the largest sum of consecutive increasing digits , and present the output with the largest sum and the positon of start and end of the consecutive digits.
Example :
Input :> 8789651
Output :> 24:2-4
where 24 is the largest sum and 2-4 is start and end of the consecutive increasing digits.

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
l = list(map(int, input()))
t = -1
x = -1
y = -1
for i in range(len(l)):
	s = l[i]
	a = i + 1
	b = i + 1
	for j in range(i + 1, len(l)):
		if l[i] < l[j]:
			s = s + l[j]
			b = j + 1
		else:
			break
	if s > t:
		t = s
		x = a
		y = b
print(t, end=':')
print(x, y, sep='-')


a = input().strip()
r = []
for i in range(len(a)):
	s = int(a[i])
	k = 0
	for j in range(i, len(a) - 1):
		if a[j + 1] > a[j]:
			s = s + int(a[j + 1])
			k += 1
		else:
			break
	r.append([i + 1, i + k + 1, s])
for i in range(len(r)):
	for j in range(i + 1, len(r)):
		if r[i][2] > r[j][2]:
			c = r[j]
			r[j] = r[i]
			r[i] = c
print('{}:{}-{}'.format(r[-1][2], r[-1][0], r[-1][1]))


n = input() + '0'
max_sum = 0
max_pos = ''
start = 0
sum = int(n[0])
for i in range(1, len(n)):
	if n[i - 1] >= n[i]:
		if max_sum < sum:
			max_sum = sum
			max_pos = '{}-{}'.format(start + 1, i)
		start = i
		sum = int(n[i])
	else:
		sum += int(n[i])
print('{}:{}'.format(max_sum, max_pos))


a = input()
a = [int(i) for i in a]
l = []
for i in range(len(a)):
	s = a[i]
	k = 0
	for j in range(i, len(a) - 1):
		if a[j] < a[j + 1]:
			s += a[j + 1]
			k += 1
		else:
			break
	l.append([i + 1, k + 1 + i, s])
for i in range(len(l)):
	for j in range(i + 1, len(l)):
		if l[i][-1] > l[j][-1]:
			c = l[i]
			l[i] = l[j]
			l[j] = c
print('{}:{}-{}'.format(l[-1][-1], l[-1][0], l[-1][1]))


n = str(input())
max = 0
i = 0
sum = int(n[i])
a = 1
b = 1
p = 1
q = 1
while i < len(n) - 1:
	i += 1
	if int(n[i - 1]) < int(n[i]):
		sum = sum + int(n[i])
		b += 1
	else:
		if sum > max:
			max = sum
			p = a
			q = b
		sum = int(n[i])
		a = i + 1
		b = a
print('{}:{}-{}'.format(max, p, q))


arr = input().strip()
res = []
for i in range(len(arr)):
	s = int(arr[i])
	k = 0
	for j in range(i, len(arr) - 1):
		if arr[j + 1] > arr[j]:
			s = s + int(arr[j + 1])
			k += 1
		else:
			break
	res.append([i + 1, i + k + 1, s])
for i in range(len(res)):
	for j in range(i + 1, len(res)):
		if res[i][2] > res[j][2]:
			temp = res[j]
			res[j] = res[i]
			res[i] = temp
print('{}:{}-{}'.format(res[-1][2], res[-1][0], res[-1][1]))


n = input()
arr = list(map(int, n))
n = len(arr)
m = 1
l = 1
s = 0
maxIndex = 0
c = 0
for i in range(1, n):
	if arr[i] > arr[i - 1]:
		l = l + 1
	else:
		if m < l:
			m = l
			maxIndex = i - m
		l = 1
if m < l:
	m = l
	maxIndex = n - m
for i in range(maxIndex, m + maxIndex):
	s += arr[i]
	c += 1
print(f'{s}:{maxIndex + 1}-{m + maxIndex}')


number = input()
number = list(number)
number = list(map(int, number))
d1 = {}
for i in range(len(number) - 1):
	k = number[i]
	for j in range(i, len(number) - 1):
		if number[j + 1] > number[j]:
			k = k + number[j + 1]
		else:
			d1[i] = k
			break
d1[len(number) - 1] = number[len(number) - 1]
Keymax = max(d1, key=d1.get)
all_values = d1.values()
max_value = max(all_values)
sum1 = number[i]
for i in range(Keymax, len(number) - 1):
	if number[i + 1] > number[i]:
		pass
	else:
		print(str(max_value) + ':' + str(Keymax + 1) + '-' + str(i + 1))
		break


a = input()
(initial, final) = (1, 1)
cinitial = 1
prev = -1
sum = 0
max = 0
for i in range(len(a)):
	if int(a[i]) > prev:
		sum += int(a[i])
	else:
		if sum > max:
			max = sum
			initial = cinitial
			final = i
		sum = int(a[i])
		cinitial = i + 1
	prev = int(a[i])
if sum > max:
	max = sum
	initial = cinitial
	final = len(a)
print(max, ':', initial, '-', final, sep='')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	n = input()
	num = [int(i) for i in n]
	n = len(num)
	summ = []
	idx = []
	for i in range(n):
		for j in range(i + 1, n + 1):
			arr = num[i:j]
			if sorted(arr) == arr:
				summ.append(sum(arr))
				idx.append([i + 1, j])
	idxx = summ.index(max(summ))
	print(str(summ[idxx]) + ':' + str(idx[idxx][0]) + '-' + str(idx[idxx][1]))

def __starting_point():
	main()
__starting_point()


import math
n = int(input())
s = str(n)
arr = list()
for ss in s:
	arr.append(int(ss))
nn = len(arr)
maxi = 0
first = 0
last = 0
for i in range(nn):
	mm = arr[i]
	sum = arr[i]
	f = i + 1
	l = i + 1
	for j in range(i + 1, nn):
		if arr[j] > mm:
			mm = arr[j]
			sum += arr[j]
			l = j + 1
	if sum > maxi:
		maxi = sum
		first = f
		last = l
print(f'{maxi}:{first}-{last}')


l = list(input())
s = int(l[0])
l1 = []
l2 = []
l3 = []
l3.append(1)
for i in range(1, len(l)):
	if int(l[i - 1]) < int(l[i]):
		s += int(l[i])
	else:
		l1.append(int(s))
		s = int(l[i])
		l3.append(i + 1)
	if i == len(l) - 1:
		l3.append(i + 1)
		l1.append(int(s))
if l3[1 + l1.index(max(l1))] == len(l):
	print('{}:{}-{}'.format(max(l1), l3[l1.index(max(l1))], l3[1 + l1.index(max(l1))]))
else:
	print('{}:{}-{}'.format(max(l1), l3[l1.index(max(l1))], l3[1 + l1.index(max(l1))] - 1))


import sys
try:

	def readstring():
		return sys.stdin.readline().lstrip().rstrip()
	count = 0
	ind = ''
	beg = 0
	n = readstring()
	n += '0'
	x1 = int(n[0])
	for i in range(1, len(n)):
		if n[i - 1] >= n[i]:
			if count < x1:
				count = x1
				ind = '{}-{}'.format(beg + 1, i)
			beg = i
			x1 = int(n[i])
		else:
			x1 += int(n[i])
	sys.stdout.write(str(count) + ':' + str(ind) + '\n')
except:
	pass