Skip to content

Commit 153b0ef

Browse files
authored
Update clumsy-factorial.cpp
1 parent a915dd4 commit 153b0ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/clumsy-factorial.cpp

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 {
2121
public:

0 commit comments

Comments
 (0)