Skip to content

Commit e29a907

Browse files
committedFeb 11, 2021
2021-02-10
1 parent bea30f9 commit e29a907

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Solution(object):
2+
def totalMoney(self, n):
3+
"""
4+
:type n: int
5+
:rtype: int
6+
"""
7+
day_cnt = 1
8+
summ = 0
9+
for i in range(1, n + 1):
10+
if i % 7 == 1:
11+
day_cnt = i // 7 + 1
12+
summ += day_cnt
13+
day_cnt += 1
14+
15+
return summ

0 commit comments

Comments
 (0)
Please sign in to comment.