結果

問題 No.6 使いものにならないハッシュ
ユーザー %20%20
提出日時 2017-12-13 17:20:22
言語 Perl
(5.38.2)
結果
AC  
実行時間 867 ms / 5,000 ms
コード長 252 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 30,332 KB
最終ジャッジ日時 2023-10-14 23:09:25
合計ジャッジ時間 17,482 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,788 KB
testcase_01 AC 3 ms
4,812 KB
testcase_02 AC 867 ms
30,332 KB
testcase_03 AC 109 ms
8,924 KB
testcase_04 AC 240 ms
13,820 KB
testcase_05 AC 196 ms
11,960 KB
testcase_06 AC 533 ms
21,824 KB
testcase_07 AC 484 ms
20,800 KB
testcase_08 AC 557 ms
22,148 KB
testcase_09 AC 788 ms
28,928 KB
testcase_10 AC 3 ms
4,532 KB
testcase_11 AC 110 ms
9,144 KB
testcase_12 AC 539 ms
21,744 KB
testcase_13 AC 675 ms
26,636 KB
testcase_14 AC 685 ms
26,920 KB
testcase_15 AC 430 ms
19,056 KB
testcase_16 AC 635 ms
26,192 KB
testcase_17 AC 763 ms
29,064 KB
testcase_18 AC 792 ms
29,304 KB
testcase_19 AC 748 ms
27,940 KB
testcase_20 AC 577 ms
23,408 KB
testcase_21 AC 62 ms
7,288 KB
testcase_22 AC 693 ms
26,280 KB
testcase_23 AC 518 ms
21,864 KB
testcase_24 AC 641 ms
24,820 KB
testcase_25 AC 485 ms
21,080 KB
testcase_26 AC 752 ms
28,024 KB
testcase_27 AC 698 ms
26,176 KB
testcase_28 AC 319 ms
16,360 KB
testcase_29 AC 752 ms
28,068 KB
testcase_30 AC 634 ms
24,644 KB
testcase_31 AC 643 ms
25,032 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]+1
	}
	$h[$h]=++$r;
	if($r-$l+1>=$x){
		$x=$r-$l+1;
		$\=$p[$l-1]
	}
}
print
0