fun printDivisors(n: Int) {
for (i in 1 until (n / 2) + 1) {
if (n % i == 0) {
println(i)
}
}
if (n > 1) {
println(n)
}
}
fun main() {
val n = 12
println("Dzielniki liczby $n:")
printDivisors(n)
}
ZnVuIHByaW50RGl2aXNvcnMobjogSW50KSB7CiAgZm9yIChpIGluIDEgdW50aWwgKG4gLyAyKSArIDEpIHsKICAgIGlmIChuICUgaSA9PSAwKSB7CiAgICAgIHByaW50bG4oaSkKICAgIH0KICB9CgogIGlmIChuID4gMSkgewogICAgcHJpbnRsbihuKQogIH0KfQoKZnVuIG1haW4oKSB7CiAgdmFsIG4gPSAxMgoKICBwcmludGxuKCJEemllbG5pa2kgbGljemJ5ICRuOiIpCiAgcHJpbnREaXZpc29ycyhuKQp9