Adjusted sum

Dessign the function @suma_ajustada(limit, k, maxim)@ that, given three integers greater tha zero limitlimit, kk and maximmaxim, returns the longest increasing list formed by consecutive multiples of kk lower than maximmaxim that add up less than limitlimit. If the list is not emptemty its first element has to be kk.

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T14:29:50.087Z

© Jutge.org, 2006–2026.
https://jutge.org