You are viewing a single comment's thread. Return to all comments →
def strangeGrid(r, c): if (r-1) % 2 == 0: first_number = (r // 2) * 10 else: first_number = (((r-1) //2) * 10) + 1 return first_number + ((2 * c)-2)
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 →
def strangeGrid(r, c): if (r-1) % 2 == 0: first_number = (r // 2) * 10 else: first_number = (((r-1) //2) * 10) + 1 return first_number + ((2 * c)-2)