結果

問題 No.2768 Password Crack
ユーザー p-adicp-adic
提出日時 2024-05-08 15:39:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,736 KB
平均クエリ数 1096.87
最終ジャッジ日時 2024-05-09 19:29:49
合計ジャッジ時間 4,168 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
27,592 KB
testcase_01 AC 40 ms
27,480 KB
testcase_02 AC 127 ms
27,608 KB
testcase_03 AC 129 ms
26,968 KB
testcase_04 AC 91 ms
27,352 KB
testcase_05 AC 46 ms
27,480 KB
testcase_06 AC 129 ms
27,608 KB
testcase_07 AC 96 ms
27,096 KB
testcase_08 AC 71 ms
27,608 KB
testcase_09 AC 89 ms
27,480 KB
testcase_10 AC 93 ms
27,480 KB
testcase_11 AC 93 ms
27,352 KB
testcase_12 AC 102 ms
27,608 KB
testcase_13 AC 94 ms
27,696 KB
testcase_14 AC 90 ms
27,608 KB
testcase_15 AC 85 ms
27,096 KB
testcase_16 AC 87 ms
27,224 KB
testcase_17 AC 109 ms
27,608 KB
testcase_18 AC 107 ms
27,608 KB
testcase_19 AC 70 ms
27,608 KB
testcase_20 AC 66 ms
27,224 KB
testcase_21 AC 89 ms
27,352 KB
testcase_22 AC 81 ms
27,608 KB
testcase_23 AC 52 ms
27,352 KB
testcase_24 AC 61 ms
27,224 KB
testcase_25 AC 85 ms
27,128 KB
testcase_26 AC 60 ms
27,352 KB
testcase_27 AC 81 ms
27,736 KB
testcase_28 AC 52 ms
27,224 KB
testcase_29 AC 55 ms
27,352 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:14: SyntaxWarning: invalid decimal literal
  else:S+="za"[i<N-1or a<n];a+=1

ソースコード

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