Created
February 12, 2021 17:36
This is my code of Problem C of AtCoder Beginner Contest 187.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 入力 | |
N = int(input()) | |
# listではなくset | |
Slist = {input() for _ in range(N)} | |
# Slistに含まれる文字列を全探索 | |
for searchword in Slist: | |
# !を付けたものがSlistに存在するなら、searchwordを出力し終了 | |
if "!"+searchword in Slist: | |
print(searchword) | |
exit() | |
# 求めるものがなければsatisfiableを出力 | |
print("satisfiable") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment