You are viewing a single comment's thread. Return to all comments →
Python Solution:
def viralAdvertising(n): people = 5 liked = (people // 2) shared = liked * 3 total = liked for _ in range(n - 1): liked = shared // 2 shared = liked * 3 total += liked return total
Seems like cookies are disabled on this browser, please enable them to open this website
Viral Advertising
You are viewing a single comment's thread. Return to all comments →
Python Solution: