본문 바로가기
python-algorithm

백준 28074 모비스

by 무적김두칠 2023. 6. 8.

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

 

28074번: 모비스

주어진 문자열에 포함된 알파벳 대문자들을 이용해 MOBIS를 만들 수 있으면 "YES", 그렇지 않으면 "NO"를 출력한다.

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
def solution(s):
    answer = False
    if 'M' in s and 'O' in s and 'B' in s and 'I' in s and 'S' in s:
        answer = True
    if answer:
        return 'YES'
    else:
        return 'NO'
 
 
if __name__ == '__main__':
    s = input()
    print(solution(s))
 
cs
반응형

댓글