/**
 * Calculate the total wire length based on voltage drop and weight per unit
 */
fun calculateWireLength(voltage: Int, current: Int, resistance: Int, length: Int, weightPerUnit: Int): Pair<Int, Int> {

    val voltageDrop = voltage - if (resistance > 0) current * resistance else 0
    val totalLength = if (voltageDrop >= 2) length / 2 else length
    val totalWeight = totalLength * weightPerUnit
    return Pair(totalLength, totalWeight)
}
/**
 * Calculate the total wire length based on voltage drop and weight per unit
 */
fun calculateWireLength(voltage: Int, current: Int, resistance: Int, length: Int, weightPerUnit: Int): Pair<Int, Int> {
/**
 * Calculate the total wire length based on voltage drop and weight per unit
 */
fun calculateWireLength(voltage: Int, current: Int, resistance: Int, length: Int, weightPerUnit: Int): Pair<Int, Int> {

    val voltageDrop = voltage - if (resistance > 0) current * resistance else 0
    val totalLength = if (voltageDrop >= 2) length / 2 else length
    val totalWeight = totalLength * weightPerUnit
    return Pair(totalLength, totalWeight)
}