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.
I didn't clearly understand your question. If you are asking how I reached one liner, then that's exactly what's written in Elaborated version : the variables in 2nd and 3rd lines are replaced by their values in 1st and 2nd lines respectively, to get a single line. Let me know if I misunderstood your question though.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Gemstones
You are viewing a single comment's thread. Return to all comments →
I didn't clearly understand your question. If you are asking how I reached one liner, then that's exactly what's written in Elaborated version : the variables in 2nd and 3rd lines are replaced by their values in 1st and 2nd lines respectively, to get a single line. Let me know if I misunderstood your question though.