結果
問題 |
No.2925 2-Letter Shiritori
|
ユーザー |
|
提出日時 | 2024-10-12 16:49:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 27,728 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2024-10-12 16:49:15 |
合計ジャッジ時間 | 2,052 ms |
ジャッジサーバーID (参考情報) |
judge / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 10 |
ソースコード
from string import ascii_lowercase used = set() while True: typ = input() if len(typ) == 1: reply = typ + typ print(reply) used.add(typ) else: r, w = typ.split() if r == '!': exit() else: a, b = list(w) used.add(a) used.add(b) flag = False for c in ascii_lowercase: if c not in used: reply = b + c print(reply) used.add(c) flag = True break if not(flag): print(b + 'a')