Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable.
parent
7f3f5bc070
commit
1d997a3ece
|
@ -6,7 +6,7 @@ fun main() {
|
|||
print("K number: ")
|
||||
val kNumber = readln().toInt()
|
||||
|
||||
var arr = Array(maxSize + 1, { false })
|
||||
val arr = Array(maxSize + 1, { false })
|
||||
for (i in 3 until maxSize + 1 - kNumber step 3) {
|
||||
arr[i] = true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue