N-ibonacci X67561


Statement
 

pdf   zip

html

Input The input are two numbers. The first of them indicates the value for n, that indicates the amount of ones at the beginning and how many of the previous elements need to be summed. If n is 2, you will get the Fibonacci series, if n is 3 Tribonacci... The second number is the amount of elements of the series the program must output.

Output The first elements of the n-ibonacci series for the provided values on the input.

Public test cases
  • Input

    4 9
    

    Output

    1 1 1 1 4 7 13 25 49 
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Java
    User solutions
    C++ Python