<@U9PBD20NL>… because … why not:) ```fun getDiviso...
# announcements
m
@Jan Järfalk… because … why not:)
Copy code
fun getDivisors(n: Int) =
        (1..Math.sqrt(n.toDouble()).toInt())
                .filter { n % it == 0 }
                .flatMap {
                    if (Math.pow(it.toDouble(), 2.0).toInt() != n) listOf(it, n / it) else listOf(it)
                }
👍 1