• + 0 comments

    Here is the my Kotlin solution :

    fun squares(a: Int, b: Int): Int {

    val lowerLimit = ceil(sqrt(a.toDouble())).toInt()
    val upperLimit = floor(sqrt(b.toDouble())).toInt()  
    
    return  upperLimit-lowerLimit + 1
    

    }