結果

問題 No.2768 Password Crack
ユーザー 👑 timitimi
提出日時 2024-06-02 05:28:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 230 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 82,320 KB
実行使用メモリ 94,168 KB
平均クエリ数 1785.17
最終ジャッジ日時 2024-06-02 05:28:38
合計ジャッジ時間 7,192 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
70,600 KB
testcase_01 AC 56 ms
70,436 KB
testcase_02 AC 201 ms
93,744 KB
testcase_03 AC 188 ms
93,960 KB
testcase_04 AC 193 ms
93,460 KB
testcase_05 AC 75 ms
77,064 KB
testcase_06 AC 196 ms
93,732 KB
testcase_07 AC 191 ms
94,032 KB
testcase_08 AC 107 ms
83,684 KB
testcase_09 AC 189 ms
93,076 KB
testcase_10 AC 192 ms
93,272 KB
testcase_11 AC 230 ms
93,708 KB
testcase_12 AC 225 ms
93,880 KB
testcase_13 AC 190 ms
93,872 KB
testcase_14 AC 211 ms
93,528 KB
testcase_15 AC 213 ms
93,924 KB
testcase_16 AC 219 ms
94,168 KB
testcase_17 AC 192 ms
93,916 KB
testcase_18 AC 197 ms
93,820 KB
testcase_19 AC 149 ms
93,432 KB
testcase_20 AC 149 ms
92,992 KB
testcase_21 AC 196 ms
93,332 KB
testcase_22 AC 199 ms
93,656 KB
testcase_23 AC 83 ms
80,620 KB
testcase_24 AC 136 ms
89,188 KB
testcase_25 AC 211 ms
93,944 KB
testcase_26 AC 134 ms
87,768 KB
testcase_27 AC 178 ms
94,008 KB
testcase_28 AC 97 ms
79,404 KB
testcase_29 AC 116 ms
83,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
D=[]
N=int(input())
for i in range(N):
  D.append('a')
  
ans=[]
for i in range(N):
  C=[]
  for j in range(25):
    D[i]=chr(ord('a')+j) 
    c=''.join(D)
    print('?',c)
    s=int(input())
    C.append(s)
  D[i]=chr(ord('a')) 
  if len(set(C))==1:
    ans.append('z')
  else:
    ma=max(C)
    ans.append(chr(ord('a')+C.index(ma)))
print('!',''.join(ans))
0