結果

問題 No.656 ゴルフ
ユーザー prog470prog470
提出日時 2018-05-17 10:57:19
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 922 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 8,383 ms
コンパイル使用メモリ 253,292 KB
実行使用メモリ 62,304 KB
最終ジャッジ日時 2023-09-12 19:20:38
合計ジャッジ時間 18,800 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 892 ms
62,304 KB
testcase_01 AC 911 ms
61,796 KB
testcase_02 AC 904 ms
62,144 KB
testcase_03 AC 922 ms
61,752 KB
testcase_04 AC 919 ms
61,632 KB
testcase_05 AC 914 ms
61,936 KB
testcase_06 AC 907 ms
61,952 KB
testcase_07 AC 898 ms
61,740 KB
testcase_08 AC 899 ms
62,132 KB
testcase_09 AC 919 ms
61,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

    var ans = 0

    for(e <- S) {
      e match {
        case 0 => ans += 10
        case _ => ans += e
      }
    }

    println(ans)
  }

}
0