본문 바로가기
python-algorithm

백준 11328 Strfry

by 무적김두칠 2023. 1. 2.

https://www.acmicpc.net/problem/11328

 

11328번: Strfry

C 언어 프로그래밍에서 문자열(string)은 native한 자료형이 아니다. 사실, 문자열은 그저, 문자열의 끝을 표시하기 위한 말단의 NULL이 사용된, 문자들로 이루어진 문자열일 뿐이다. 하지만 프로그래

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
10
11
12
13
def sol(s1,s2):
    s1, s2 =sorted(s1), sorted(s2)
    if s1 == s2 :
        return 'Possible'
    else:
        return 'Impossible'
 
if __name__ == '__main__':
    n = int(input())
    for _ in range(n):
        s1, s2 = map(str, input().split())
        print(sol(s1,s2))
        
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 23343 JavaScript  (0) 2023.01.03
백준 24267 알고리즘 수업 - 알고리즘의 수행 시간 6  (0) 2023.01.03
백준 3512 Flat  (0) 2022.12.31
백준 26264 빅데이터? 정보보호!  (0) 2022.12.30
백준 26004 HI-ARC  (0) 2022.12.28

댓글