結果

問題 No.390 最長の数列
ユーザー %20%20
提出日時 2017-08-28 01:29:51
言語 Perl
(5.38.2)
結果
AC  
実行時間 4,387 ms / 5,000 ms
コード長 134 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 6,016 KB
実行使用メモリ 90,496 KB
最終ジャッジ日時 2024-04-24 00:33:33
合計ジャッジ時間 13,970 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 398 ms
70,144 KB
testcase_01 AC 190 ms
42,496 KB
testcase_02 AC 372 ms
70,144 KB
testcase_03 AC 260 ms
58,496 KB
testcase_04 AC 379 ms
70,272 KB
testcase_05 AC 372 ms
37,084 KB
testcase_06 AC 2,721 ms
90,496 KB
testcase_07 AC 231 ms
70,144 KB
testcase_08 AC 13 ms
13,824 KB
testcase_09 AC 236 ms
70,144 KB
testcase_10 AC 682 ms
62,288 KB
testcase_11 AC 772 ms
66,260 KB
testcase_12 AC 702 ms
64,204 KB
testcase_13 AC 1,020 ms
83,456 KB
testcase_14 AC 4,387 ms
90,480 KB
testcase_15 AC 13 ms
14,592 KB
testcase_16 AC 13 ms
14,336 KB
testcase_17 AC 35 ms
16,640 KB
testcase_18 AC 53 ms
19,328 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::N" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

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