10. 10 <?php $n = count($numbers); for ($i = 0; $i < $n - 1; ++$i) { for ($j = $i + 1; $j < $n; ++$j) { if ($numbers[$i] == $numbers[$j]) { echo "{$i} and {$j}n"; } } } • 外の for : (n – 1) 回 • 内の for : (n – i) 回 • if : O(1) O(1) × {(n – 1) + (n – 2) + … + 1} = O(1) × n(n – 1) / 2 = O(n2 )