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.
Did almost the same thing. Just that i didnt use count and decremented k instead. Later checked if k was 0 or less than 0. Also, didnt store the nextInt() variable at all :D
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Angry Professor
You are viewing a single comment's thread. Return to all comments →
Did almost the same thing. Just that i didnt use count and decremented k instead. Later checked if k was 0 or less than 0. Also, didnt store the nextInt() variable at all :D