Page not loading? Try clicking here.
Placeholder

#9677
Language restricted

함수3 - 연습문제 5 1s 32MB

Problems

1이상 3이하의 정수 N이 주어졌을 때, 1부터 3까지의 정수를 중복을 허용하지 않고 N번 나열하는 모든 경우를 출력하는 프로그램을 작성하시오.


Input

첫 줄에 정수 N이 주어진다. (1 \le N \le 3)


Example

3
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1


Source

자기주도 파이썬 4판

You must sign in to write code.