6 kyu

Jungerstein's Math Training Room: 1. How many zeros are at the end of n!! ?

990 of 1,508jungerstein
Description
Loading description...
Puzzles
Mathematics
Number Theory
Discrete Mathematics
View
AllIssues4Questions2Suggestions4Show Resolved
  • Please sign in or sign up to leave a comment.
  • TreverArnold Avatar

    This comment has been hidden.

  • marjan Avatar

    c++ translation???

  • Cloud Walker Avatar

    No odd inputs in examples? lol 😆 How come?

  • migzaws@@ Avatar

    guys what is !! in n!! from what i know its not or n notnot ? im confused im new ^_^

  • 4500zenja1 Avatar

    Fork for C which fixes the following warning:

    fixture.c:3:16: warning: implicit declaration of function 'count_zeros_n_double_fact' is invalid in C99 [-Wimplicit-function-declaration]
        int val8 = count_zeros_n_double_fact(8); 
                   ^
    
  • Just4FunCoder Avatar

    Python fork

    • Fixed test framework setup
    • Added assertion message
    • Changed description (count_zeros_n_double_fact(30)) to be more language agnostic
  • tdm725 Avatar

    My numbers are reaching infinity. Am I approaching the problem incorrectly?

  • Tertuliano Avatar

    After passing the basic tests, I've got this message: "For the random test with 4387: should be 0, but you got 550". Why the output should be zero in that case? It doesn't make sense to me, since the input 4387 is large enough to contain many zeros in 4387!!.

  • benjaminzwhite Avatar

    This comment has been hidden.

  • Shaun112345 Avatar

    I cant see enough test case answers to debug my solution

  • akar-0 Avatar
  • Ally1248 Avatar

    I don't understand the prompt. How does 384 have no 0s but 30 has 3 0s..

  • dfhwze Avatar
  • xuliny Avatar

    for python n = 41, why output should == 62?

  • nomennescio Avatar

    The tests in the C version do not show the expected outcome, whereas the tests in the Python version do. That makes the C version harder to solve, as no hints are given into towards the right answer. Please adapt

  • vasdeferensly Avatar

    I'm not sure the C version is working correctly, as my output is:

    Log n = 8 number of 0 = 0 Test Passed

    Log n = 30 number of 0 = 3 Test Passed

    Log n = 1443 number of 0 = 144 Test Passed

    Log n = 9295 number of 0 = 929 Test Passed

    Log n = 302 number of 0 = 30 The expression count_zeros_n_double_fact(randomed) == test_zeros(randomed) is false.

  • rcornell Avatar

    In JS, the large number tests are making it impossible to solve, I think. For numbers like 589 they get so large that the product is just (1312312313xE^24) or something like that and it can't be parsed.

  • rnelson082 Avatar

    hello there. enjoyed chipping away at your kata. i am running into some trouble with the exponential...im still a newb, but i did put in some time... any tips?

  • lechevalier Avatar

    Too bad, I was expecting n!! == (n!)! :/

  • St3f4n Avatar

    Hello, jungerstein I've added a JavaScript translation.

  • Unnamed Avatar

    The arguments of assert_equals are in the wrong order.