結果
問題 | No.2768 Password Crack |
ユーザー |
![]() |
提出日時 | 2024-05-31 21:47:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 269 ms / 2,000 ms |
コード長 | 405 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 93,868 KB |
平均クエリ数 | 1785.17 |
最終ジャッジ日時 | 2024-12-20 23:05:08 |
合計ジャッジ時間 | 7,985 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 29 |
ソースコード
def query(T):T = "".join(T)print("? {}".format(T))return int(input())N = int(input())L = ["z"] * Nans = ["! "]for i in range(N):D = [0] * 25for j in range(25):L[i] = chr(j + ord("a"))D[j] = query(L)ma = max(D)if D.count(ma) == 1:ans.append(chr(ord("a") + D.index(ma)))else:ans.append("z")L[i] = "z"print(*ans, sep="")