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.
It was easy to crack as its all power and its reciprocal to retrace the steps for the solution i.e. if take square root of each number it is a squence of 1. e.g.
sqrt(121)=11.0 = (100-1//9)
sqrt(12321)=111.0=(1000-1)//9
sqrt(1234321)=1111.0=(10000-1)//9
Hence the solution:
print ((pow(10,i)//9)**2)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Triangle Quest 2
You are viewing a single comment's thread. Return to all comments →
It was easy to crack as its all power and its reciprocal to retrace the steps for the solution i.e. if take square root of each number it is a squence of 1. e.g.
Hence the solution:
print ((pow(10,i)//9)**2)