Skip to content

Commit

Permalink
add a Scala solution
Browse files Browse the repository at this point in the history
  • Loading branch information
austrin committed Oct 30, 2018
1 parent 9747f0d commit bb62c65
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/different/submissions/accepted/Different.scala
@@ -0,0 +1,11 @@
object Different {
def main(args: Array[String]) {
var line = scala.io.StdIn.readLine()
while (line != null) {
val Array(a, b) = line.split(" ").map(_.toLong)
val r = scala.math.abs(a - b)
Console.out.println(r)
line = scala.io.StdIn.readLine()
}
}
}

0 comments on commit bb62c65

Please sign in to comment.