結果
問題 | No.390 最長の数列 |
ユーザー | kagikakko_kari |
提出日時 | 2016-09-17 18:07:48 |
言語 | PHP (8.3.4) |
結果 |
TLE
|
実行時間 | - |
コード長 | 340 bytes |
コンパイル時間 | 2,433 ms |
コンパイル使用メモリ | 32,144 KB |
実行使用メモリ | 49,684 KB |
最終ジャッジ日時 | 2024-04-28 15:20:52 |
合計ジャッジ時間 | 9,569 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 42 ms
32,528 KB |
testcase_01 | AC | 42 ms
32,276 KB |
testcase_02 | AC | 40 ms
32,276 KB |
testcase_03 | AC | 40 ms
32,404 KB |
testcase_04 | AC | 40 ms
32,272 KB |
testcase_05 | TLE | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $N = trim(fgets(STDIN)); $x = explode(" ",trim(fgets(STDIN))); rsort($x); $ans = array(); $ans = array_pad($ans,$N,0); $i = 0; while($i < $N){ $j = $i; while($j < $N){ if($x[$i] % $x[$j] == 0){ ++$ans[$i]; } ++$j; } ++$i; } $ans = array_count_values($ans); echo count($ans) . PHP_EOL ; ?>