The Algorithms logo
The Algorithms
Про AlgorithmsПожертвувати

Is Prime

i
package dynamicProgramming

fun Int.isPrime() = this > 1 && (2..(this / 2)).all { this % it != 0 }