結果

問題 No.2768 Password Crack
ユーザー tailstails
提出日時 2024-05-31 22:22:42
言語 Perl
(5.38.2)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 1,162 ms
コンパイル使用メモリ 7,072 KB
実行使用メモリ 25,220 KB
平均クエリ数 885.00
最終ジャッジ日時 2024-05-31 22:22:56
合計ジャッジ時間 4,267 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
24,812 KB
testcase_01 AC 27 ms
25,136 KB
testcase_02 AC 104 ms
25,220 KB
testcase_03 AC 31 ms
24,964 KB
testcase_04 AC 68 ms
25,220 KB
testcase_05 AC 35 ms
24,836 KB
testcase_06 AC 66 ms
24,580 KB
testcase_07 AC 32 ms
25,220 KB
testcase_08 AC 39 ms
24,580 KB
testcase_09 AC 65 ms
25,220 KB
testcase_10 AC 72 ms
24,836 KB
testcase_11 AC 67 ms
25,220 KB
testcase_12 AC 73 ms
24,964 KB
testcase_13 AC 72 ms
24,848 KB
testcase_14 AC 68 ms
24,836 KB
testcase_15 AC 63 ms
24,964 KB
testcase_16 AC 67 ms
25,220 KB
testcase_17 AC 67 ms
25,208 KB
testcase_18 AC 67 ms
24,580 KB
testcase_19 AC 47 ms
24,836 KB
testcase_20 AC 46 ms
24,580 KB
testcase_21 AC 66 ms
24,836 KB
testcase_22 AC 60 ms
24,836 KB
testcase_23 AC 35 ms
25,220 KB
testcase_24 AC 44 ms
25,220 KB
testcase_25 AC 67 ms
25,220 KB
testcase_26 AC 45 ms
24,836 KB
testcase_27 AC 61 ms
24,836 KB
testcase_28 AC 37 ms
24,964 KB
testcase_29 AC 40 ms
25,220 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use feature 'say';
$|=1;
$n=<>;
$z="z"x$n;
say "? ","a"x$n;
$o=<>;
for$i(0..$n-1){
	for$c("b".."y"){
		say "? ","a"x$i,$c,"a"x($n-$i-1);
		$r=<>;
		if($r>$o){
			substr($z,$i,1)=$c;
			last;
		}
		if($r<$o){
			substr($z,$i,1)="a";
			last;
		}
	}
}
say "! $z";
0