Created
August 1, 2014 22:41
-
-
Save ffloyd/9a378f2cf49a6bbbf7ff to your computer and use it in GitHub Desktop.
time limit bullshit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Problem1001 extends App { | |
val numbersStrings = io.Source.stdin.getLines() | |
for { | |
x <- numbersStrings.flatMap { | |
_.split(" ").filterNot { _.isEmpty }.map { x => math.sqrt(x.toDouble) } | |
}.toList.reverse | |
} yield println(f"$x%.04f".replace(',', '.')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment