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.
defstrangeGrid(r,c):# we surely know that if row is even then number is odd and vice versa (row odd = even number )ifr%2!=0:return(math.ceil(r/2)-1)*10+(2*(c-1))else:return((math.ceil(r/2)-1)*10+1)+(2*(c-1))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Strange Grid Again
You are viewing a single comment's thread. Return to all comments →