Length of Longest Ascending Factor

Write a function @asc_stair@ that receives as argument a sequence of
non-negative integers, and returns the length of the longest “ascending
staircase” or subsequence of consecutive integers where each is strictly
bigger than the previous one (technically, the length of the longest
ascending factor).

Input is received as argument of the function. It is a list of integer
values, all positive or zero.

The result returned by the function must be an integer @k@ such that the
longest ascending sequences of consecutive integers in the input are of
length @k@.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T16:55:18.428Z

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