>>> f(100000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in f
File "<stdin>", line 1, in f
File "<stdin>", line 1, in f
[Previous line repeated 996 more times]
RecursionError: maximum recursion depth exceeded in comparison
>>>
【 在 puja (puja) 的大作中提到: 】
: def f(b,a=1) : return [[a,a+99]] + f(b, a + 100) if b - a > 99 else [[a,b]]
: f(495)
: [[1, 100], [101, 200], [201, 300], [301, 400], [401, 495]]
: ...................
--
FROM 59.77.36.*