def viralAdvertising(n):
# Write your code here
cum = 0
shared = 5
for i in range(n):
liked = shared // 2
cum += liked
shared = liked * 3
return cum
'# 코딩 문제 관련 > 파이썬' 카테고리의 다른 글
[HackerRank-python] Circular Array Rotation (0) | 2022.07.27 |
---|---|
[HackerRank-python] Save the Prisoner! (0) | 2022.07.27 |
[HackerRank-python] Beautiful Days at the Movies (0) | 2022.07.25 |
[HankerRank-python] Angry Professor (0) | 2022.07.24 |
[HackerRank-python] Utopian tree (0) | 2022.07.20 |