Skip to content

Commit 68a2d4b

Browse files
committed
Improved task
1 parent 3c93e41 commit 68a2d4b

File tree

1 file changed

+0
-14
lines changed
  • src/main/kotlin/g3101_3200/s3130_find_all_possible_stable_binary_arrays_ii

1 file changed

+0
-14
lines changed

src/main/kotlin/g3101_3200/s3130_find_all_possible_stable_binary_arrays_ii/Solution.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,6 @@ class Solution {
8282
return ((x % mod) + mod) % mod
8383
}
8484

85-
fun quickPower(base: Long, power: Long, p: Long): Long {
86-
var base = base
87-
var power = power
88-
var result: Long = 1
89-
while (power > 0) {
90-
if ((power and 1L) == 1L) {
91-
result = result * base % p
92-
}
93-
power = power shr 1
94-
base = base * base % p
95-
}
96-
return result
97-
}
98-
9985
companion object {
10086
private const val MOD = 1e9.toInt() + 7
10187
private const val N = 1000

0 commit comments

Comments
 (0)