結果
問題 |
No.2925 2-Letter Shiritori
|
ユーザー |
👑 |
提出日時 | 2024-06-12 01:29:26 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 82,132 KB |
実行使用メモリ | 83,444 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2024-10-12 14:00:24 |
合計ジャッジ時間 | 2,582 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 10 |
ソースコード
written = set() alpha = input() assert ord('a') <= ord('alpha') <= ord('z') pre = alpha while True: S = pre + alpha print('?', S, flush=True) written.add(S) cmd, T = input().split() if cmd == '?': assert len(T) == 2 assert all(ord('a') <= ord(t) <= ord('z') for t in T) assert T not in written assert S[1] == T[0] pre = T[1] if cmd == '!': exit()