Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: trekhleb/javascript-algorithms
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: RequireSun/javascript-algorithms
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: patch-3
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 12, 2018

  1. Create README.zh-CN.md

    RequireSun authored Dec 12, 2018
    Copy the full SHA
    ea511ae View commit details

Commits on Dec 17, 2018

  1. Copy the full SHA
    51d494e View commit details

Commits on Dec 28, 2018

  1. Copy the full SHA
    2d8fd99 View commit details
Showing with 27 additions and 0 deletions.
  1. +27 −0 src/algorithms/math/factorial/README.zh-CN.md
27 changes: 27 additions & 0 deletions src/algorithms/math/factorial/README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 阶乘

在数学上, 一个正整数 `n` 的阶乘 (写作 `n!`), 就是所有小于等于 `n` 的正整数的乘积. 比如:

```
5! = 5 * 4 * 3 * 2 * 1 = 120
```

| n | n! |
| ----- | --------------------------: |
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5 040 |
| 8 | 40 320 |
| 9 | 362 880 |
| 10 | 3 628 800 |
| 11 | 39 916 800 |
| 12 | 479 001 600 |
| 13 | 6 227 020 800 |
| 14 | 87 178 291 200 |
| 15 | 1 307 674 368 000 |