2018-05-18 11:56:07 +02:00
|
|
|
|
## Zadanie
|
|
|
|
|
|
|
|
|
|
Napisać algorytm, który dla danego `n ∈ ℕ` znajdzie wszystkie:
|
2018-05-18 11:58:52 +02:00
|
|
|
|
|
2018-05-18 11:56:07 +02:00
|
|
|
|
1. elementy odwracalne
|
|
|
|
|
2. dzielniki zera
|
|
|
|
|
3. elementy nilpotentne
|
2018-05-18 11:58:52 +02:00
|
|
|
|
4. elementy idempotentne
|
|
|
|
|
|
2018-05-18 11:56:07 +02:00
|
|
|
|
w pierścieniu `{ℤ/nℤ, +, ⋅}`.
|
|
|
|
|
|
2018-05-24 18:11:20 +02:00
|
|
|
|
Termin: 31.05
|
|
|
|
|
|
2018-05-18 11:56:07 +02:00
|
|
|
|
### Przykłady:
|
|
|
|
|
|
2018-05-18 11:58:52 +02:00
|
|
|
|
> Input: `4`
|
|
|
|
|
> Output: `[[1,3], [0,2], [0,2], [0,1]]`
|
2018-05-18 11:56:07 +02:00
|
|
|
|
|
2018-05-18 11:58:52 +02:00
|
|
|
|
> Input: `6`
|
|
|
|
|
> Output: `[[1,5], [0,2,3,4], [0], [0,1,3,4]]`
|
2018-05-18 11:56:07 +02:00
|
|
|
|
|