We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #204: Generalised Hamming Numbers
  4. Discussions

Project Euler #204: Generalised Hamming Numbers

Problem
Submissions
Leaderboard
Discussions

Sort 12 Discussions, By:

recency

Please Login in order to post a comment

  • django_work
    3 months ago+ 0 comments

    def is_hamming_numbers(x):`

    if x == 1:
        return 1
    if x % 2 == 0:
        return is_hamming_numbers(x / 2)
    if x % 3 == 0:
        return is_hamming_numbers(x / 3)
    if x % 5 == 0:
        return is_hamming_numbers(x / 5)
    return 0
    

    c = 1

    for i in range(1, 100000000): if is_hamming_numbers(i) == True:

    I am getting timeout errors here

        c += 1
    

    print(c) `

    0|
    Permalink
  • [deleted] 2 years ago+ 0 comments

    can anyone tell me language with low compilation time

    0|
    Permalink
  • Stealth_py
    4 years ago+ 0 comments

    I cannot get my output printed. It says terminated due to timeout but i dont understand why thats happening? Can any1 help me out? What could be the reason?

    0|
    Permalink
  • satish5657s
    4 years ago+ 1 comment

    can someone paste code here my code is passing only 1 test case other test cases are terminated due to time out

    0|
    Permalink
  • reynoldmorel
    5 years ago+ 0 comments

    I get timeout exception in my code. Im using java 8 and I only can get 44.0 scores. Can somebody help me to understand better the behavior of this problem? I cant see any other patterns.

    0|
    Permalink
Load more conversations

Need Help?


View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature