waysToShut関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every way to make a total from different numbers 1 to 9, largest first: the tiles a Shut the Box roll may shut.
インポート
import { waysToShut } from "@johnmorrisdotca/korokoro";
定義
function waysToShut(total: number): number[][]
引数
| 名前 | 型 | 説明 |
|---|---|---|
total | number | The total to measure or compare. |
戻り値
number[][]
Every way to make a total from different numbers 1 to 9, largest first: the tiles a Shut the Box roll may shut.
例
import { waysToShut } from "@johnmorrisdotca/korokoro";
console.log(waysToShut(7));[ [ 7 ], [ 6, 1 ], [ 5, 2 ], [ 4, 3 ], [ 4, 2, 1 ] ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。