Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
TopCoder SRM 648 Div2
# SRM 648 Div2 Easy
class KitayutaMart2():
def numBought(self, k, t):
n = 1
ksum = k
while True:
if ksum == t:
return n
n += 1
ksum += 2**(n-1)*k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.