7 kyu
The Hyperfactorial
331 of 355оkabe
Loading description...
Mathematics
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
nice kat
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.
your code is missing something explicit from the directions
Good kata
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.
You forgot to apply the modulo.
ah shit. You are right, thanks a lot!
Ruby Translation
Approved
"the product of the numbers from
1**1
ton**n
" is different from hyperfactorial. For example, forn = 2
n**n
is4
and the product is1 * 2 * 3 * 4
.Fixed
@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 n is the product of the numbers 11,22,...,nn:
H(n)=11×22×33×...×(n−1)n−1×nn
H(n)=∏i=1nii
Source markdown for the above, in case it's easier to copy paste:
@benjaminzwhite Much thanks!
Provide some error messages for the random tests, something like:
Done!