結果
問題 |
No.2925 2-Letter Shiritori
|
ユーザー |
![]() |
提出日時 | 2024-10-12 16:39:52 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 586 bytes |
コンパイル時間 | 279 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 68,936 KB |
平均クエリ数 | 6.83 |
最終ジャッジ日時 | 2024-10-12 16:40:17 |
合計ジャッジ時間 | 2,617 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 10 |
ソースコード
a = input() s = set() while True: t = a[-1] * 2 if t not in s: s.add(t) print('?', t, flush = True) else: c = 0 for i in range(26): for j in range(26): t = chr(i + ord('a')) + chr(j + ord('a')) if t[-1] * 2 in s and t not in s: s.add(t) print('?', t, flush = True) c = 1 break if c: break b = input() if b[0] == '?': _, a = b.split() s.add(a) else: break