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. Prepare
  2. Algorithms
  3. Game Theory
  4. Tower Breakers - The Final Battle
  5. Discussions

Tower Breakers - The Final Battle

Problem
Submissions
Leaderboard
Discussions
Editorial

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

  • apandey0826
    2 years ago+ 1 comment

    According to problem statement x>=2 and k>= 1 and k<=x ;

    so for example if n=4; coin =0 (initially) 4=>{2,2} since k >=1 left {2} and coin=1^2=1 now 2=>{1,1} i.e. x=2; now take both coin 2^2=4 so answer = 1+4=5 then why 6 in testcase ...

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