30
增量范围!
您的任务是,给定两个正整数xXx和,返回增量范围序列中的前数字。nñnxXx 增量范围序列首先生成一个从1到含)的范围。例如,如果为,它将生成列表。然后,它将重复的以递增的最后值附加到现有列表中,然后继续。nñnnñn333[1,2,3][1个,2,3][1,2,3]nñn11个1 输入例如:n=3ñ=3n=3 n=3 1. Get range 1 to n. List: [1,2,3] 2. Get the last n values of the list. List: [1,2,3]. Last n=3 values: [1,2,3]. 3. Increment the last n values by 1. List: [1,2,3]. Last n values: [2,3,4]. 4. Append the last n values incremented to the …