import strutils, tables const N = 26 proc nCr(n, r: int): int = var (n, r) = (n, r) if r == 0 or n == r: return 1 if r > n-r: r = n-r var res = 1 for x in n-r+1 .. n: res *= x for x in 1 .. r: res = res div x return res var c = newSeq[int](N) res = 1 dic = initTable[char, int]() for ch in "helloworld": dic[ch] = ord(ch) - ord('a') for i in 0..