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.
When testing with input 21 I get 21 lines of output which violates the constraints as it's supposed to limit N to between 1 and 20.
I'm kind of confused because I'm not sure whether the Problem's constraints mean we're supposed to restrain inputs to that range in the program or if the end user of the program will restrain their inputs to that range.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Loops
You are viewing a single comment's thread. Return to all comments →
When testing with input 21 I get 21 lines of output which violates the constraints as it's supposed to limit N to between 1 and 20. I'm kind of confused because I'm not sure whether the Problem's constraints mean we're supposed to restrain inputs to that range in the program or if the end user of the program will restrain their inputs to that range.