首页 > TAG信息列表 > 1291

1291. 顺次数

1291. 顺次数 这种量少的题最简单快捷的方法就是打表。 class Solution { public List<Integer> sequentialDigits(int low, int high) { int[] cur = new int[]{12,23,34,45,56,67,78,89,123,234,345,456,567,678,789,1234,2345,3456,4567,5678,6789, 12345

[LeetCode] 1291. Sequential Digits 顺次数

An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers in the range [low, high] inclusive that have sequential digits. Example 1: Input: low = 100, high =

一本通 1291:数字组合

【题目描述】 有n个正整数,找出其中和为t(t也是正整数)的可能的组合方式。如: n=5,5个数分别为1,2,3,4,5,t=5; 那么可能的组合有5=1+4和5=2+3和5=5三种组合方式。 【输入】 输入的第一行是两个正整数n和t,用空格隔开,其中1≤n≤20,表示正整数的个数,t为要求的和(1≤t≤1000); 接下