Calculate Money in Leetcode Bank LeetCode solution in Python

1
from itertools import cycle, repeat, starmap
2
from operator import floordiv
3

4

5
class Solution:
6
def totalMoney(self, n: int) -> int:
7
return sum(
8
starmap(
9
add,
10
zip(
11
starmap(floordiv, zip(range(n), repeat(7, n))),
12
cycle((1, 2, 3, 4, 5, 6, 7)),
13
),
14
)
15
)

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0