7 kyu

The Hyperfactorial

331 of 355оkabe
Description
Loading description...
Mathematics
View
AllIssues1Questions1Suggestions1Show Resolved
  • Please sign in or sign up to leave a comment.
  • leckomio Avatar

    My code passed the first 5 testcases, then it failes.

    is the testing correct?? Since 86% of 58 warriors solved it, I guess my code is the problem.

  • tekmenbe Avatar

    The hyperfactorial above and equal 6 is not right guys? It is not even possible that is has the same length of digits (78371783) as H(5). The solution 4031078400000 should be right. I got a mistake message even tho, my code was right.

  • Unnamed Avatar

    "the product of the numbers from 1**1 to n**n" is different from hyperfactorial. For example, for n = 2 n**n is 4 and the product is 1 * 2 * 3 * 4.

    • оkabe Avatar

      Fixed

      Issue marked resolved by оkabe 3 years ago
    • benjaminzwhite Avatar

      @okabe - based on @Unnamed 's comment, if you'd like to use LaTeX formatting in your markdown, here is the LaTeX markdown corresponding to the description as it appears on the Wikipedia article - feel free to copy it if you want:


      The hyperfactorial of a positive integer nn is the product of the numbers 11,22,...,nn1^1 , 2^2, ..., n^n :

      H(n)=11×22×33×...×(n1)n1×nnH(n) = 1^1 \times 2^2 \times 3^3 \times ... \times (n-1)^{n-1} \times n^n

      H(n)=i=1niiH(n) = \prod_{i=1}^{n} i^i


      Source markdown for the above, in case it's easier to copy paste:

      
      The hyperfactorial of a positive integer `$n$` is the product of the numbers `$1^1 , 2^2, ..., n^n $`:
      
      `$H(n) = 1^1 \times 2^2 \times 3^3 \times ... \times (n-1)^{n-1} \times n^n$`
      
      `$H(n) = \prod_{i=1}^{n} i^i $`
      
    • оkabe Avatar

      @benjaminzwhite Much thanks!

  • yLaWy Avatar

    Provide some error messages for the random tests, something like:

    For n = 25, X should equal 568992600