728x90
반응형
백준 BAEKJOON 32969번 학술대회 참가신청 [PYTHON/파이썬]
[목차여기]
<문제 출처> (BRONZE Ⅲ)
https://www.acmicpc.net/problem/32969
<풀이>
디지털 인문학이라고 판단 되는 단어들이
입력으로 주어진 논문 주제에 있다면 "digital humanities"를 출력,
그렇지 않다면 "public bigdata"를 출력했다.
효율적으로 출력하기 위해 exit(0)을 사용했다.
<코드>
digital_humanities = ["social", "history", "language", "literacy"]
topic = input()
for i in digital_humanities:
if i in topic:
print("digital humanities")
exit(0)
print("public bigdata")
728x90
반응형
'ALGORITHM > PYTHON' 카테고리의 다른 글
백준 BAEKJOON 1531번 투명 [PYTHON/파이썬] (0) | 2025.03.16 |
---|---|
백준 BAEKJOON 3135번 라디오 [PYTHON/파이썬] (0) | 2025.03.13 |
백준 BAEKJOON 32951번 AI 선도대학 [PYTHON/파이썬] (0) | 2025.03.06 |
백준 BAEKJOON 32941번 왜 맘대로 예약하냐고 [PYTHON/파이썬] (0) | 2025.02.25 |
백준 BAEKJOON 32929번 UOS 문자열 [PYTHON/파이썬] (0) | 2025.02.25 |