結果
問題 |
No.2768 Password Crack
|
ユーザー |
|
提出日時 | 2024-05-31 22:04:35 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 438 bytes |
コンパイル時間 | 333 ms |
コンパイル使用メモリ | 82,420 KB |
実行使用メモリ | 84,092 KB |
平均クエリ数 | 27.00 |
最終ジャッジ日時 | 2024-12-20 23:33:46 |
合計ジャッジ時間 | 9,298 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | WA * 1 RE * 28 |
ソースコード
from random import shuffle N = int(input()) l = list("abcdefghijklmnopqrstuvwxyz") S = "" for i in range(N): shuffle(l) cnts = [] for c in l: print('?', S + c + 'a' * (N - 1 - i)) x = int(input()) cnts.append((x, c)) if len(cnts) >= 3 and len(set(cnts)) == 2: cnts.sort() c = 0 for i, _ in cnts: if i == cnts[0][0]: c += 1 if c == 1: S += cnts[0][1] else: S += cnts[-1][1] break print('!', S)