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 |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 27. Remove Element (0) | 2023.06.19 |
---|---|
leetcode 744. Find Smallest Letter Greater Than Target (0) | 2023.06.09 |
백준 28097 모범생 포닉스 (0) | 2023.06.08 |
백준 27890 특별한 작은 분수 (0) | 2023.06.08 |
백준 28113 정보섬의 대중교통 (0) | 2023.06.07 |
댓글