+ 2

Write a program to input three digits and print all its possible combinations .

Suppose your input is 2,3 and 4 . Then it should print 234 , 243 ,432 , 423 , 324 ,342 .

15th Sep 2017, 4:12 AM
Harsh Tirkey
Harsh Tirkey - avatar
1 Respuesta
0
I know simplest solution, but I'll write by python. from itertools import combinations arr = input().split(" ") print(list(combinations(arr, len(arr))))
15th Sep 2017, 5:29 AM
Stephan
Stephan - avatar