Dessign the function @sum_dig(f, k, n)@ that, given a list of non negative integers, a non negative integer and an integer , returns a list with the first numbers in whose digits add up more than . If does not have numbers holding this property, the function will return the empty list.
It’s mandatory to use the function @sumadigitos(num)@ below to calculate the sum of digits:
def sumadigitos(num):
return sum([int(i) for i in list(str(num))])
Author: InfBesos
Generation: 2026-01-25T16:41:35.405Z
© Jutge.org, 2006–2026.
https://jutge.org