You are viewing a single comment's thread. Return to all comments →
def solve(n): if n < 3 : return -1 elif n%4 == 1 or n%4 == 3 : return 2 elif n%4 == 0 : return 3 else: return 4
Seems like cookies are disabled on this browser, please enable them to open this website
Triangle Numbers
You are viewing a single comment's thread. Return to all comments →