Maximum Number with Limited Digits

Write a function maxlim(m,k)maxlim(m, k) that finds the largest number that can be written with at most kk digits taken from mm, and written in the same order as they appear in mm. Both mm and kk are nonnegative integers.

Observation

The digits of all numbers are assumed to be as written in base 10.

Problem information

Author: Jordi Delgado / José Luis Balcázar

Generation: 2026-01-25T14:43:17.927Z

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