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

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Dynamic Programming
  4. P-sequences
  5. Discussions

P-sequences

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • er_vikramsnehi
    2 years ago+ 0 comments

    In JavaScript,

    var result=0;
        for(var i=1;i<=n;i++)
        {
            for(var j=1;j<=n;j++)
                {
                    if(i*j<=p)
                    {
                        result = result+1;
                    }
                }
        }
        return(result)
    		
    

    something is not working here.

    -1|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy