implement keypad

This commit is contained in:
2024-12-10 11:05:43 -06:00
parent 775e6f9239
commit 1cdfc9b927
6 changed files with 222 additions and 0 deletions

7
src/utils.py Normal file
View File

@@ -0,0 +1,7 @@
from math import factorial, comb
def total_valid_nkode_states(k: int, p: int) -> int:
return factorial(k) ** (p-1)
def total_shuffle_states(k: int, p: int) -> int:
return comb(p, p // 2) * factorial(k)