python
class Solution:
def sequentialDigits(self, low: int, high: int) -> List[int]:
ans=[]
for i in range(1,10):
num=i
nt_digit=i+1
while num<high and nt_digit<=9:
num=num*10+nt_digit
if low<=num and num<=high:
ans.append(num)
nt_digit+=1
return sorted(ans)
模拟