Programeu en Python3 la funció:
def patro(n: int, k: int) -> None
que rep dos enters positius
i
i escriu a la sortida el patró mostrat als
exemples.
Deduïu el patró a partir dels exemples.
Escriviu un programa principal que llegeixi dos enters de l’entrada i cridi a la funció per a que generi el patró.
L’entrada són dos enters positius i .
La sortida és el patró corresponent segons es mostra als exemples.
Input
1 3
Output
0
Input
2 3
Output
0 01 0
Input
3 3
Output
0 01 0 012 0 01 0
Input
4 3
Output
0 01 0 012 0 01 0 0120 0 01 0 012 0 01 0
Input
5 4
Output
0 01 0 012 0 01 0 0123 0 01 0 012 0 01 0 01230 0 01 0 012 0 01 0 0123 0 01 0 012 0 01 0
Input
5 3
Output
0 01 0 012 0 01 0 0120 0 01 0 012 0 01 0 01201 0 01 0 012 0 01 0 0120 0 01 0 012 0 01 0