꾸준히 합시다

백준 파이썬 16337번: Die 본문

코딩 테스트 문제 풀이

백준 파이썬 16337번: Die

tturbo0824 2021. 6. 13. 18:17

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

 

16337번: Die

The boss of Binary Casino wants to have control over games played in his casino. This is especially true in the case of dice games, as from time to time people try to cheat their way to the victory by manipulating dice even after a throw has already occurr

www.acmicpc.net

문제 유형: 구현, 문자열

 

 

# Solution 1

first = input()
second = input()
third = input()

if first == ":::" and second == ":o:" and third == ":::":
    print(1)
elif (first == "o::" and second == ":::" and third == "::o") or (first == "::o" and second == ":::" and third == "o::"):
    print(2)
elif (first == "o::" and second == ":o:" and third == "::o") or (first == "::o" and second == ":o:" and third == "o::"):
    print(3)
elif first == "o:o" and second == ":::" and third == "o:o":
    print(4)
elif first == "o:o" and second == ":o:" and third == "o:o":
    print(5)
elif (first == "ooo" and second == ":::" and third == "ooo") or (first == "o:o" and second == "o:o" and third == "o:o"):
    print(6)
else:
    print("unknown")

 

Comments