도움받은 곳 : https://latte-is-horse.tistory.com/379
[solved.ac 실버3] 2992_크면서 작은 수 (파이썬, 순열)
https://github.com/mangbaam/CodingTest GitHub - mangbaam/CodingTest: 프로그래머스, 백준 등 코딩테스트 풀이를 기록하는 저장소입니다. 프로그래머스, 백준 등 코딩테스트 풀이를 기록하는 저장소입니다. Con..
latte-is-horse.tistory.com
(나중에 다시 풀어볼 것)
from itertools import permutations
n = input()
all = list(set(map(lambda x: ''.join(x), (permutations(n,len(n))))))
all.sort()
if all[-1]==n:
print(0)
else:
print(all[all.index(n)+1])
'백준' 카테고리의 다른 글
그룹 단어 체커 - 1316번 (0) | 2022.08.17 |
---|---|
기타줄 - 1049번 (0) | 2022.07.30 |
돌 게임 - 9655번 (0) | 2022.07.27 |
뒤집기 - 백준 1439번 (0) | 2022.07.25 |
수들의 합 - 백준 1789번 (0) | 2022.06.28 |
댓글