You are viewing a single comment's thread. Return to all comments →
My Python code that passed all the test cases:
def solve(S): # S = initial strength mod_n = 10**9 + 7 if S%20 != 0: return ((S//20)*42 + (S%20)*2) % mod_n else: return ((S//20)*42 - 2) % mod_n
Seems like cookies are disabled on this browser, please enable them to open this website
Wet Shark and 42
You are viewing a single comment's thread. Return to all comments →
My Python code that passed all the test cases: