Skip to content

Files

Latest commit

7a7d3f2 · Oct 20, 2020

History

History

16.11.Diving Board

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 20, 2020
Oct 20, 2020
Jul 8, 2020

English Version

题目描述

你正在使用一堆木板建造跳水板。有两种类型的木板,其中长度较短的木板长度为shorter,长度较长的木板长度为longer。你必须正好使用k块木板。编写一个方法,生成跳水板所有可能的长度。

返回的长度需要从小到大排列。

示例:

输入:
shorter = 1
longer = 2
k = 3
输出: {3,4,5,6}

提示:

  • 0 < shorter <= longer
  • 0 <= k <= 100000

解法

Python3

Java

...