-
[python]백준 당신은 운명을 믿나요? 27930번알고리즘 문제풀이/백준(파이썬) 2023. 4. 28. 22:14
코드
import sys sys.stdin = open("27930.txt", "r") s=list(input()) KOREA=["K" ,"O" ,"R" ,"E" ,"A"] YONSEI=["Y" ,"O" ,"N" ,"S" ,"E" ,"I"] for i in s: if i in KOREA: KOREA.remove(i) if len(KOREA)==0: print("KOREA") break if i in YONSEI: YONSEI.remove(i) if len(YONSEI)==0: print("YONSEI") break
링크
https://www.acmicpc.net/problem/27930
'알고리즘 문제풀이 > 백준(파이썬)' 카테고리의 다른 글
[python]백준 진짜 공간 1350번 (0) 2023.04.30 [python]백준 파티가 끝나고 난 뒤 2845번 (0) 2023.04.29 [python]백준 10부제 10797번 (0) 2023.04.28 [python]백준 초코바 27959번 (0) 2023.04.27 [python]백준 특별한 학교 이름 27889번 (0) 2023.04.26