結果

問題 No.2768 Password Crack
ユーザー rin204
提出日時 2024-05-31 21:38:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 411 bytes
コンパイル時間 1,872 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 94,008 KB
平均クエリ数 1785.17
最終ジャッジ日時 2024-12-20 22:47:30
合計ジャッジ時間 13,180 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 1 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = ["a"] * n
for i in range(1, n + 1):
    mi = 1 << 30
    ma = -1
    ss = "z"
    for j in range(25):
        s = chr(97 + j)
        S[i - 1] = s
        print("?", "".join(S), flush=True)
        res = int(input())
        mi = min(mi, res)
        if ma > res:
            ma = max(ma, res)
            ss = s

    if mi == ma:
        ss = "z"
    S[i - 1] = ss

print("!", "".join(S))
0