Files
Algorithm/백준/1722.py
2026-04-11 11:48:03 +09:00

22 lines
535 B
Python

import sys
from itertools import permutations
import math
N = int(input())
problem = list(map(int, input().split())) #problem이 주어진 문제
a=[]
for i in range(1, N+1):
a.append(i) # a는 순서대로 순열 있는거
if problem[0] == 1:
print(*arr[problem[1]-1])
elif problem[0] == 2:
for i in range(1, N+1):
new_arr.append(problem[i]) # new_arr가 배열만 저장되어 있는거
temp = 1
for i in arr:
if(list(i) == new_arr):
print(temp)
break
temp += 1