結果
| 問題 |
No.2925 2-Letter Shiritori
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 16:09:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 2,000 ms |
| コード長 | 617 bytes |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 82,568 KB |
| 実行使用メモリ | 69,320 KB |
| 平均クエリ数 | 26.00 |
| 最終ジャッジ日時 | 2024-10-12 16:09:41 |
| 合計ジャッジ時間 | 2,187 ms |
|
ジャッジサーバーID (参考情報) |
judge / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 |
ソースコード
from sys import stdin
def output(*values):
print(*values, flush=True)
def main():
alpha = stdin.readline().rstrip()
abc = set('abcdefghijklmnopqrstuvwxyz')
# print(abc)
first = True
tail = ''
while True:
if first:
out = alpha + alpha
abc.remove(alpha)
first = False
else:
out = tail + alpha
output('?', out)
judge_input = stdin.readline().rstrip()
if judge_input == '! LOSE' or judge_input == '! WIN':
return
tail = judge_input[-1]
if __name__ == "__main__":
main()