結果

問題 No.2768 Password Crack
ユーザー naut3
提出日時 2024-06-01 02:18:11
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 566 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 82,976 KB
実行使用メモリ 85,628 KB
平均クエリ数 1.00
最終ジャッジ日時 2024-12-21 04:30:04
合計ジャッジ時間 9,759 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other RE * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

import random


def main():
    alphas = [chr(ord('a') + i) for i in range(26)]
    ans = []

    N = int(input())

    for i in range(N):
        random.shuffle(alphas)

        T = ['a' for _ in range(N)]
        counts_max = None

        for x in alphas:
            T[i] = x

            print(*T, sep="", flush=True)
            c = int(input())

            if counts_max is None:
                counts_max = c
            else:
                if counts_max < c:
                    ans.append(x)
                    break

    print(*ans, sep='')


main()
0