Iterator.continually(readLine)
.map(BigDecimal.apply)
.toVector.sorted
}
case ints
if ints.
length % 2 == 0 ⇒
val index
= ints.
length /
2 ints.slice(index - 1, index + 1).sum / 2
ints(ints.length / 2)
}
println(f"$result%.1f")
}
b2JqZWN0IE1haW4gZXh0ZW5kcyBBcHAgewogIGRlZiBzb3J0ZWRJbnB1dCgpID0gewogICAgSXRlcmF0b3IuY29udGludWFsbHkocmVhZExpbmUpCiAgICAgIC50YWtlV2hpbGUoXy5uZShudWxsKSkKICAgICAgLm1hcChCaWdEZWNpbWFsLmFwcGx5KQogICAgICAudG9WZWN0b3Iuc29ydGVkCiAgfQogIAogIHZhbCByZXN1bHQgPSBzb3J0ZWRJbnB1dCgpIG1hdGNoIHsKICAgIGNhc2UgaW50cyBpZiBpbnRzLmxlbmd0aCAlIDIgPT0gMCDih5IKICAgICAgdmFsIGluZGV4ID0gaW50cy5sZW5ndGggLyAyCiAgICAgIGludHMuc2xpY2UoaW5kZXggLSAxLCBpbmRleCArIDEpLnN1bSAvIDIKICAgICAgCiAgICBjYXNlIGludHMg4oeSCiAgICAgIGludHMoaW50cy5sZW5ndGggLyAyKQogIH0KICAKICBwcmludGxuKGYiJHJlc3VsdCUuMWYiKQp9