Skip to content

Commit a915dd4

Browse files
authored
Update clumsy-factorial.py
1 parent 662b98a commit a915dd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/clumsy-factorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# if N = 2 => N
1313
# if N = 3 => N + 3
1414
# if N = 4 => N + 2 + 1 = N + 3
15-
# if N > 4 and N % 4 == 0 => N + 1 + (... = 0) + 5 - (4*3/2) + 1 = N + 1
1615
# if N > 4 and N % 4 == 1 => N + 1 + (... = 0) + 2 - 1 = N + 2
1716
# if N > 4 and N % 4 == 2 => N + 1 + (... = 0) + 3 - 2 * 1 = N + 2
1817
# if N > 4 and N % 4 == 3 => N + 1 + (... = 0) + 4 - 3 * 2 / 1 = N - 1
18+
# if N > 4 and N % 4 == 0 => N + 1 + (... = 0) + 5 - (4*3/2) + 1 = N + 1
1919

2020
class Solution(object):
2121
def clumsy(self, N):

0 commit comments

Comments
 (0)