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.
Thanks, FilipeGoncaves!
Got AC now. But why should that be the error? I was just counting the number of same consecutive numbers, which will never exceed 10^5. The ans, I was storing in variable ans itself, which was already a long long. Can you explain a bit? :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Pairs
You are viewing a single comment's thread. Return to all comments →
Thanks, FilipeGoncaves!
Got AC now. But why should that be the error? I was just counting the number of same consecutive numbers, which will never exceed
10^5
. The ans, I was storing in variableans
itself, which was already along long
. Can you explain a bit? :)