본문 바로가기
python-algorithm

백준 9253 스페셜 저지

by 무적김두칠 2022. 10. 25.
a=input()
b=input()
c=input()
if c in a and c in b:
    print("YES")
else:
    print("NO")

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

 

9253번: 스페셜 저지

답이 맞으면 YES, 틀리면 NO를 출력한다.

www.acmicpc.net

문제 조건 상 사용자가 출력한 답이 실제 정답과 길이가 같으므로
사용자가 출력한 문자열이 원래 문자열에 존재하는지 비교하면됨

In this problem, Real Answer has same length to User's answer
So You just check User's answer is in Original Strings. 

반응형

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

백준 25784 Easy-to-Solve Expressions  (0) 2022.10.26
백준 25704 출석 이벤트  (0) 2022.10.26
백준 8949 대충 더해  (0) 2022.10.24
백준 2154 수 이어 쓰기 3  (0) 2022.10.23
백준 10205 헤라클레스와 히드라  (0) 2022.10.22

댓글