結果

問題 No.390 最長の数列
ユーザー %20%20
提出日時 2017-08-28 01:07:04
言語 Perl
(5.38.2)
結果
AC  
実行時間 2,768 ms / 5,000 ms
コード長 144 bytes
コンパイル時間 32 ms
コンパイル使用メモリ 6,016 KB
実行使用メモリ 90,284 KB
最終ジャッジ日時 2024-04-24 00:31:47
合計ジャッジ時間 7,896 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
6,016 KB
testcase_01 AC 7 ms
6,016 KB
testcase_02 AC 7 ms
5,888 KB
testcase_03 AC 7 ms
6,016 KB
testcase_04 AC 7 ms
6,016 KB
testcase_05 AC 372 ms
42,436 KB
testcase_06 AC 2,768 ms
90,284 KB
testcase_07 AC 7 ms
5,888 KB
testcase_08 AC 13 ms
13,696 KB
testcase_09 AC 235 ms
70,144 KB
testcase_10 AC 671 ms
62,144 KB
testcase_11 AC 755 ms
65,984 KB
testcase_12 AC 717 ms
64,188 KB
testcase_13 AC 1,035 ms
83,332 KB
testcase_14 AC 499 ms
35,576 KB
testcase_15 AC 7 ms
6,016 KB
testcase_16 AC 13 ms
14,336 KB
testcase_17 AC 33 ms
16,640 KB
testcase_18 AC 49 ms
19,328 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::N" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

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