We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1b2c8c commit 213ce8aCopy full SHA for 213ce8a
src/leetcode/Pow.php
@@ -50,7 +50,7 @@ public static function myPow3(float $x, int $n): float
50
if ($n < 0) {
51
return 1 / self::myPow3($x, -$n);
52
}
53
- $y = self::myPow3($x, (int)($n / 2));
+ $y = self::myPow3($x, intdiv($n, 2));
54
55
return $n % 2 === 0 ? $y * $y : $y * $y * $x;
56
0 commit comments