Skip to content

Commit 83a5202

Browse files
committed
[23.11.14/Python] arr
1 parent 3d7e471 commit 83a5202

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Python_BOJ_2023/10811.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
n, m = map(int, input().split())
2+
3+
arr = [i for i in range(1, n + 1)]
4+
5+
for _ in range(m):
6+
i, j = map(int, input().split())
7+
8+
tmp = arr[i-1 : j]
9+
tmp = tmp[::-1]
10+
arr[i-1:j] = tmp
11+
12+
for i in arr:
13+
print(i, end=' ')

0 commit comments

Comments
 (0)