Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

61 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f3841000cf542c50fe97
title: 问题24字典排列
challengeType: 5
videoUrl: ''
dashedName: problem-24-lexicographic-permutations
---
# --description--
置换是对象的有序排列。例如3124是数字1,2,3和4的一种可能的排列。如果所有排列都以数字或字母顺序列出我们称之为词典顺序。字典排列0,1和2是
012 021 102 120 201 210
数字0,1,2,3,4,5,6,7,8和9的第`n`个词典排列是什么?
# --hints--
`lexicographicPermutations(699999)`应该返回1938246570。
```js
assert(lexicographicPermutations(699999) == 1938246570);
```
`lexicographicPermutations(899999)`应该返回2536987410。
```js
assert(lexicographicPermutations(899999) == 2536987410);
```
`lexicographicPermutations(900000)`应该返回2537014689。
```js
assert(lexicographicPermutations(900000) == 2537014689);
```
`lexicographicPermutations(999999)`应该返回2783915460。
```js
assert(lexicographicPermutations(999999) == 2783915460);
```
# --seed--
## --seed-contents--
```js
function lexicographicPermutations(n) {
return n;
}
lexicographicPermutations(999999);
```
# --solutions--
```js
// solution required
```