結果

問題 No.6 使いものにならないハッシュ
ユーザー %20%20
提出日時 2017-12-13 17:24:43
言語 Perl
(5.38.2)
結果
AC  
実行時間 804 ms / 5,000 ms
コード長 244 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 5,156 KB
実行使用メモリ 30,164 KB
最終ジャッジ日時 2023-10-14 23:09:51
合計ジャッジ時間 16,926 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,520 KB
testcase_01 AC 3 ms
4,624 KB
testcase_02 AC 804 ms
30,164 KB
testcase_03 AC 110 ms
9,024 KB
testcase_04 AC 230 ms
13,912 KB
testcase_05 AC 180 ms
12,104 KB
testcase_06 AC 479 ms
21,864 KB
testcase_07 AC 436 ms
20,964 KB
testcase_08 AC 490 ms
22,032 KB
testcase_09 AC 697 ms
28,872 KB
testcase_10 AC 2 ms
4,548 KB
testcase_11 AC 109 ms
8,908 KB
testcase_12 AC 475 ms
21,840 KB
testcase_13 AC 633 ms
26,644 KB
testcase_14 AC 659 ms
26,944 KB
testcase_15 AC 419 ms
19,320 KB
testcase_16 AC 640 ms
26,084 KB
testcase_17 AC 750 ms
29,232 KB
testcase_18 AC 758 ms
29,548 KB
testcase_19 AC 686 ms
28,168 KB
testcase_20 AC 559 ms
23,324 KB
testcase_21 AC 59 ms
7,148 KB
testcase_22 AC 646 ms
26,220 KB
testcase_23 AC 507 ms
21,844 KB
testcase_24 AC 586 ms
24,736 KB
testcase_25 AC 440 ms
21,036 KB
testcase_26 AC 732 ms
28,044 KB
testcase_27 AC 655 ms
26,336 KB
testcase_28 AC 313 ms
16,208 KB
testcase_29 AC 743 ms
28,020 KB
testcase_30 AC 604 ms
24,728 KB
testcase_31 AC 581 ms
24,920 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($K,$N)=@_=<>;
map{//;$_[$_+=$']=1while$_<$N}2..$N;
@p=grep!$_[$_],$K..$N;
for(@p){
	$h=$_;
	while($h>9){
		$t=0;
		$t+=$_ for$h=~/./g;
		$h=$t
	}
	if($l<=$h[$h]){
		$l=$h[$h]
	}
	$h[$h]=++$r;
	if($r-$l>=$x){
		$x=$r-$l;
		$\=$p[$l]
	}
}
print
0