Ad
  • Custom User Avatar
  • Custom User Avatar

    n and p are not "infinite", they are limited in all languages but the limits can vary through languages (some languages have naturally bignum integer type, some don't).
    Edit: it seems that you are new at CW so look at the top of the page: see that 1118 guys passed the kata (179 in Python) -> you can solve the problem.

  • Custom User Avatar

    p and n are limited (at least in javascript, I don't know if the limit is the same in every language or not). Check JohanWiltink's post below. Are you suggesting that limit should be stated in the description?

  • Custom User Avatar

    My understanding is that Pascal's triangle is a recursively generated structure and thus infinite. Computers are finite, so there is no program that can calculate S(n, p), for all n, for all p. Thus, I don't think I can solve this problem.

  • Custom User Avatar

    Duly noted. I have updated the description.

  • Custom User Avatar

    According to Wikipedia, the sequence of increasing narcissistic numbers varies by the base used. In base two, the only narcissistic numbers are zero and 1. As another example, in base ten "six" is a narcissistic number, but in base five, "six" is not a narcissistic number. I didn't see a base specified in the posing of this question. Consequently, I find the question ill-posed.

  • Custom User Avatar

    "Read again CAREFULLY the description"

    The description asks for the sum of the lowest positive numbers in the array. But, what is a lowest positive number in an array? I know the minimum of such numbers, but there exist many different ways to order numbers, and thus 'lowest' is not clear.

    So, does this kata have a solution if the phrase "lowest positive number" is ambiguous?