Skip to content

Commit 9a74e33

Browse files
committed
98차 2번 문제풀이
1 parent 5e91e0e commit 9a74e33

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

live9/test98/문제1/백유진.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
n, m = map(int, input().split())
2+
arr = list(map(int, input().split()))

live9/test98/문제2/백유진.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from itertools import permutations
2+
3+
x = input()
4+
5+
min = float("inf")
6+
7+
for p in permutations(x, len(x)):
8+
num = ''.join(p)
9+
if int(x) < int(num) < min:
10+
min = int(num)
11+
12+
if min == float("inf"):
13+
print(0)
14+
else:
15+
print(min)

0 commit comments

Comments
 (0)