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.
There are unkown number of queries, so your second loop will have to change to a while(1), and catch an exception when there's no input left.
Your code is very elegant, though, thanks!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 8: Dictionaries and Maps
You are viewing a single comment's thread. Return to all comments →
There are unkown number of queries, so your second loop will have to change to a while(1), and catch an exception when there's no input left. Your code is very elegant, though, thanks!