val n: Int = 75
val binary: String = Integer.toBinaryString(n)
println(binary) // 1001011
val n = 75
val binary = n.toString(2)
println(binary) // 1001011
fun toBinary(n: Int): String {
return if (n != 0) toBinary(n / 2) + n % 2 else { "" }
}
fun main() {
val n = 75
val binary = toBinary(n)
println(binary) // 00000000000000000000000001001011
}