LoginSignup
1
0

More than 3 years have passed since last update.

はじめてのあっとこーだー @scala

Last updated at Posted at 2019-04-28

プログラミングコンテスト界の 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とか入ってておかしいですが、とりあえずワーニングは出なくなったので、メモ。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0