結果
| 問題 |
No.2768 Password Crack
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2024-05-31 21:46:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 405 bytes |
| コンパイル時間 | 437 ms |
| コンパイル使用メモリ | 81,884 KB |
| 実行使用メモリ | 94,320 KB |
| 平均クエリ数 | 1785.17 |
| 最終ジャッジ日時 | 2024-12-20 23:03:24 |
| 合計ジャッジ時間 | 12,096 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 1 WA * 28 |
ソースコード
def query(T):
T = "".join(T)
print("? {}".format(T))
return int(input())
N = int(input())
L = ["z"] * N
ans = ["! "]
for i in range(N):
D = [0] * 25
for j in range(25):
L[i] = chr(j + ord("a"))
D[j] = query(L)
mi = min(D)
if D.count(mi) == 1:
ans.append(chr(ord("a") + D.index(mi)))
else:
ans.append("z")
L[i] = "z"
print(*ans, sep="")
rlangevin