组合数第k小
题解
讨论
查看他人的提交
题号:NC208110
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
在所有不同的组合数值中,第k小的组合数值是多少呢。给定一个k,返回第k小的组合数值。
示例1
输入
复制
1
1
返回值
复制
1
1
说明
最小的的组合数是
示例2
输入
复制
6
6
返回值
复制
6
6
说明
第6小的组合数为
备注:
组合数第k小
返回全部题目
列表加载中...
import java.util.*; public class Solution { /** * * @param k int整型 * @return int整型 */ public int kthSamllest (int k) { // write code here } }
class Solution { public: /** * * @param k int整型 * @return int整型 */ int kthSamllest(int k) { // write code here } };
# # # @param k int整型 # @return int整型 # class Solution: def kthSamllest(self , k ): # write code here
/** * * @param k int整型 * @return int整型 */ function kthSamllest( k ) { // write code here } module.exports = { kthSamllest : kthSamllest };
# # # @param k int整型 # @return int整型 # class Solution: def kthSamllest(self , k ): # write code here
package main /** * * @param k int整型 * @return int整型 */ func kthSamllest( k int ) int { // write code here }
/** * * @param k int整型 * @return int整型 */ int kthSamllest(int k ) { // write code here }
1
1
6
6