結果

問題 No.671 1000000007
コンテスト
ユーザー prog470
提出日時 2018-05-17 10:13:37
言語 Scala(Beta)
(3.8.1)
コンパイル:
scalac _filename_
実行:
java -cp .:/home/linuxbrew/.linuxbrew/Cellar/scala/3.8.1/libexec/maven2/org/scala-lang/scala3-library_3/3.8.1/scala3-library_3-3.8.1.jar:/home/linuxbrew/.linuxbrew/Cellar/scala/3.8.1/libexec/maven2/org/scala-lang/scala-library/3.8.1/scala-library-3.8.1.jar _class_
結果
AC  
実行時間 273 ms / 2,000 ms
コード長 274 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,776 ms
コンパイル使用メモリ 256,736 KB
実行使用メモリ 58,460 KB
最終ジャッジ日時 2026-03-09 15:46:06
合計ジャッジ時間 10,365 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import scala.math._

object HelloScala {
  def main(args: Array[String]): Unit = {
    val in = io.StdIn.readLine().split("")

    var cnt = 0

    for (e <- in){
      e match {
        case "0" => cnt += 1
        case _ =>
      }
    }

    println(abs(cnt - 8))

  }
}
0