/**
 * Given the rotation periods of two stars, calculate the intersection of their shifts operators and the advantages.
 *
 * @param star1 Float representing the rotation period of star 1 in days
 * @param star2 Float representing the rotation period of star 2 in days
 * @return Float representing the intersection between the shifts operators and the advantages
 */
fun findRotationPeriod(star1: Float, star2: Float): Float {

    // Determine the shorter rotation period
    val shorterPeriod = if (star1 < star2) star1 else star2

    // Find the left shift operator for shorterPeriod
    val leftShift = 1 shl shorterPeriod.toInt()

    // Find the right shift operator for shorterPeriod
    val rightShift = shorterPeriod.toInt() shr 1

    // Calculate the advantage by using bitwise AND
    val advantages = leftShift and rightShift

    return advantages.toFloat()
}
/**
 * Given the rotation periods of two stars, calculate the intersection of their shifts operators and the advantages.
 *
 * @param star1 Float representing the rotation period of star 1 in days
 * @param star2 Float representing the rotation period of star 2 in days
 * @return Float representing the intersection between the shifts operators and the advantages
 */
fun findRotationPeriod(star1: Float, star2: Float): Float {
/**
 * Given the rotation periods of two stars, calculate the intersection of their shifts operators and the advantages.
 *
 * @param star1 Float representing the rotation period of star 1 in days
 * @param star2 Float representing the rotation period of star 2 in days
 * @return Float representing the intersection between the shifts operators and the advantages
 */
fun findRotationPeriod(star1: Float, star2: Float): Float {

    // Determine the shorter rotation period
    val shorterPeriod = if (star1 < star2) star1 else star2

    // Find the left shift operator for shorterPeriod
    val leftShift = 1 shl shorterPeriod.toInt()

    // Find the right shift operator for shorterPeriod
    val rightShift = shorterPeriod.toInt() shr 1

    // Calculate the advantage by using bitwise AND
    val advantages = leftShift and rightShift

    return advantages.toFloat()
}