You are viewing a single comment's thread. Return to all comments →
function viralAdvertising(n) { let shared = 5; let ans = 0; for(let i = 1; i <= n; i++) { let liked = Math.floor(shared / 2); ans += liked; shared = liked * 3; } return ans; }
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 →