Ad
  • Custom User Avatar

    you have to return the integer n such as
    𝑛
    3

    (
    𝑛
    βˆ’
    1
    )
    3
    +
    (
    𝑛
    βˆ’
    2
    )
    3
    +
    .
    .
    .
    +
    1
    3

    π‘š
    n
    3
    +(nβˆ’1)
    3
    +(nβˆ’2)
    3
    +...+1
    3
    =m if such a n exists or -1 if there is no such n.

    OP has implemented the logic, it is basically summation of cubes of numbers from 1 to ... until it reaches or surpasses $m

  • Custom User Avatar

    I'm looking atht explination and just don't understand how it works. I'm going to have to study the wiki for this one as well.