Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e29a907

Browse files
2021年02月10日
1 parent bea30f9 commit e29a907

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /