kusano_k kusanoさん@がんばらない
TopCoder SRMで初めてPythonを使った。Python便利。
class BearPlays:
def pileSize(self, A, B, K):
t = A * pow(2,K,A+B) % (A+B)
return min(t, A+B-t)
class BearPlays:
def pileSize(self, A, B, K):
t = A * pow(2,K,A+B) % (A+B)
return min(t, A+B-t)