組み合わせ \(n^m\)

For each \(\{ x_i : 0 \leq i \lt m, 0 \leq x_i \lt n \}\)

Rust

Example

[0, 0]
[1, 0]
[2, 0]
[0, 1]
[1, 1]
[2, 1]
[0, 2]
[1, 2]
[2, 2]
9