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 →

  • harshchaplot11
    5 years ago+ 0 comments

    What is the problem with this and in testcase 2 the input is 3 and 2 and the expected output is 5 which is logically impossible. The ans must be 3 and my code is also giving ans as 3.

    include

    include

    int main() { int n,p,i,j,mul,count=0; scanf("%d %d",&n,&p); for(i=1;i

    }

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