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