結果
| 問題 | 
                            No.2768 Password Crack
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-05-31 22:00:50 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 665 bytes | 
| コンパイル時間 | 327 ms | 
| コンパイル使用メモリ | 81,936 KB | 
| 実行使用メモリ | 108,284 KB | 
| 平均クエリ数 | 748.23 | 
| 最終ジャッジ日時 | 2024-12-20 23:25:21 | 
| 合計ジャッジ時間 | 13,509 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 1 | 
| other | AC * 1 WA * 24 RE * 4 | 
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
n = int(input())
print('?','z'*n,flush=True)
z = int(input())
if z == n:
    print('!','z'*n,flush=True)
    exit()
ans = ['' for i in range(n)]
for i in range(n):
    temp = ['z' for i in range(n)]
    for j in range(25):
        temp[i] = chr(j + ord('a'))
        print('?',''.join(temp),flush=True)
        x = int(input())
        if x == z-1:
            ans[i] = 'z'
            break
        if x == z +1:
            ans[i] = temp[j]
            break
print('!',''.join(ans))