Cum pot să rezolv această problemă?

Răspuns:
nr sunt : 111 ; 222 ; 122 ; 121 ; 112 ; 211 ; 212 ; 221
8 numere