結果
| 問題 |
No.2768 Password Crack
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-01 20:35:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 439 bytes |
| コンパイル時間 | 1,648 ms |
| コンパイル使用メモリ | 82,288 KB |
| 実行使用メモリ | 94,296 KB |
| 平均クエリ数 | 1785.17 |
| 最終ジャッジ日時 | 2024-12-22 09:53:07 |
| 合計ジャッジ時間 | 9,811 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 29 |
ソースコード
from collections import defaultdict
N = int(input())
ans = ['z'] * N
T = ['z'] * N
rem = 2500
for i in range(N):
cnt = defaultdict(list)
for d in range(25):
T[i] = chr(ord('a') + d)
print('?', ''.join(T), flush=True)
n = int(input())
cnt[n].append(T[i])
if len(cnt) == 1:
continue
key = max(cnt.keys())
ans[i] = cnt[key][0]
rem -= 1
assert rem >= 0
print('!', *ans, sep='')