Created
August 21, 2015 12:54
-
-
Save anonymous/01bfa81d8d11ada954bb to your computer and use it in GitHub Desktop.
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
import java.io.PrintStream | |
import scala.io.Source | |
object main extends App { | |
val inFile = "B-large-practice.in" | |
val outFile = "B-large-practice.out" | |
Console.setIn(Source.fromFile(inFile).bufferedReader()) | |
Console.setOut(new PrintStream(outFile)) | |
val lines = Console readInt() | |
for (i <- 1 to lines) { | |
val line = Console readLine() | |
Console print "Case #" + i + ": " | |
Console println (line.split(' ').reverse.mkString(" ")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment