プログラミングコンテスト界の Hello World こと、
A - Welcome to AtCoder
なんですが。
Scalaの解答例をそのまま paiza.io に入れてみたところ、
warning: there were three deprecation warnings (since 2.11.0); re-run with -deprecation for details
one warning found
というワーニングメッセージが出ました。
どうやら readInt
とか readLine
が deprecation な模様。
object Main extends App{
import scala.io.StdIn.readLine
val Array(a) = readLine split " " map(_.toInt)
val Array(b, c) = readLine split " " map(_.toInt)
val Array(s) = readLine split " "
println(a+b+c + " " + s)
}
値が1個なのにsplitとか入ってておかしいですが、とりあえずワーニングは出なくなったので、メモ。