結果
| 問題 | 
                            No.2768 Password Crack
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-05-31 21:47:59 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 479 bytes | 
| コンパイル時間 | 1,150 ms | 
| コンパイル使用メモリ | 81,816 KB | 
| 実行使用メモリ | 84,148 KB | 
| 平均クエリ数 | 1.00 | 
| 最終ジャッジ日時 | 2024-12-20 23:07:15 | 
| 合計ジャッジ時間 | 8,873 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 1 | 
| other | RE * 29 | 
ソースコード
from collections import defaultdict
N=int(input())
ans=["a"]*N
d=defaultdict(int)
for i in range(26):
  t=chr(97+i)*N
  print("?",s,flush=1)
  n=int(input())
  d[chr(97+i)]=n
  
for i in range(N):
  
  t=="".join(ans)
  print("?",t,flush=1)
  x=int(input())
  for j in range(1,26):
    if d[chr(97+j)]==0:
      continue
    ans[i]=chr(97+j)
    t=="".join(ans)
    print("?",s,flush=1)
    n=int(input())
    if n<x:
      d[chr(97+j)]-=1
      break
print("!","".join(ans))