#P122. 数列
数列
Description
有一种数列,前K个是1,后面每一项都它前面的K项之和。求第N项。
Input Format
第一行一个整数 N和K。
Output Format
一行:对应的结果。
Sample
样例数据
input
6 2
output
8
Hint
保证。
时间限制:
空间限制:
有一种数列,前K个是1,后面每一项都它前面的K项之和。求第N项。
第一行一个整数 N和K。
一行:对应的结果。
input
6 2
output
8
保证1≤N≤1000,1≤K≤10。
时间限制:1s
空间限制:256MB
By signing up a code-fans universal account, you can submit code and join discussions in all online judging services provided by us.