結果

問題 No.2768 Password Crack
ユーザー 👑 p-adicp-adic
提出日時 2024-05-08 13:19:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 203 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 82,580 KB
実行使用メモリ 94,188 KB
平均クエリ数 1096.87
最終ジャッジ日時 2024-05-09 19:29:48
合計ジャッジ時間 5,934 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
69,404 KB
testcase_01 AC 57 ms
69,584 KB
testcase_02 AC 196 ms
93,624 KB
testcase_03 AC 197 ms
93,600 KB
testcase_04 AC 150 ms
93,076 KB
testcase_05 AC 67 ms
70,312 KB
testcase_06 AC 203 ms
93,536 KB
testcase_07 AC 127 ms
86,860 KB
testcase_08 AC 78 ms
77,184 KB
testcase_09 AC 156 ms
93,860 KB
testcase_10 AC 159 ms
94,188 KB
testcase_11 AC 156 ms
93,616 KB
testcase_12 AC 156 ms
93,152 KB
testcase_13 AC 164 ms
93,504 KB
testcase_14 AC 162 ms
93,856 KB
testcase_15 AC 148 ms
92,800 KB
testcase_16 AC 161 ms
93,344 KB
testcase_17 AC 176 ms
94,168 KB
testcase_18 AC 153 ms
93,396 KB
testcase_19 AC 101 ms
81,736 KB
testcase_20 AC 98 ms
82,884 KB
testcase_21 AC 151 ms
93,456 KB
testcase_22 AC 130 ms
88,224 KB
testcase_23 AC 78 ms
77,176 KB
testcase_24 AC 97 ms
83,256 KB
testcase_25 AC 152 ms
92,936 KB
testcase_26 AC 93 ms
81,740 KB
testcase_27 AC 150 ms
92,928 KB
testcase_28 AC 80 ms
77,524 KB
testcase_29 AC 84 ms
78,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,O=input,range,print
N=int(I())
S=""
T="a"*N
O("?",T)
n=int(I())
a=0
for i in R(N):
	for d in R(1,25+(i<N-1)):
		c=chr(ord('a')+d)
		O("?",T[:i]+c+T[i+1:])
		m=int(I())
		if m>n:S+=c;break
	else:S+="za"[i<N-1or a<n];a+=1
O("!",S)
0