結果

問題 No.390 最長の数列
ユーザー %20%20
提出日時 2017-08-28 01:32:02
言語 Perl
(5.38.2)
結果
AC  
実行時間 4,002 ms / 5,000 ms
コード長 133 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 5,504 KB
実行使用メモリ 86,648 KB
最終ジャッジ日時 2024-04-24 00:34:26
合計ジャッジ時間 12,886 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 401 ms
69,376 KB
testcase_01 AC 194 ms
41,856 KB
testcase_02 AC 376 ms
69,248 KB
testcase_03 AC 265 ms
57,600 KB
testcase_04 AC 370 ms
69,376 KB
testcase_05 AC 154 ms
33,268 KB
testcase_06 AC 2,577 ms
86,528 KB
testcase_07 AC 230 ms
69,248 KB
testcase_08 AC 8 ms
12,928 KB
testcase_09 AC 231 ms
69,504 KB
testcase_10 AC 476 ms
58,360 KB
testcase_11 AC 556 ms
62,324 KB
testcase_12 AC 518 ms
60,536 KB
testcase_13 AC 871 ms
80,128 KB
testcase_14 AC 4,002 ms
86,648 KB
testcase_15 AC 8 ms
13,952 KB
testcase_16 AC 9 ms
13,696 KB
testcase_17 AC 21 ms
15,616 KB
testcase_18 AC 30 ms
18,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

<>;$/=$";
for$x(sort{$a-$b}<>){
	++$d[$x]>$%and$%=$d[$x];
	for($i=2*$x;$i<=1e6;$i+=$x){
		$d[$x]>$d[$i]and$d[$i]=$d[$x]
	}
}
print$%
0