ICode9

精准搜索请尝试: 精确搜索
  • 1291. 顺次数2022-07-02 15:31:44

    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 顺次数2022-04-04 23:35:48

    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:数字组合2022-02-01 18:59:49

    【题目描述】 有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); 接下

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有