結果

問題 No.289 数字を全て足そう
ユーザー lrf141lrf141
提出日時 2017-03-25 23:49:18
言語 Scala(Beta)
(3.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 300 bytes
コンパイル時間 9,203 ms
コンパイル使用メモリ 246,644 KB
実行使用メモリ 63,640 KB
最終ジャッジ日時 2023-09-12 12:37:10
合計ジャッジ時間 34,607 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 978 ms
62,568 KB
testcase_01 AC 985 ms
62,552 KB
testcase_02 AC 985 ms
62,780 KB
testcase_03 AC 993 ms
62,852 KB
testcase_04 AC 998 ms
62,444 KB
testcase_05 AC 996 ms
62,528 KB
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 AC 983 ms
62,356 KB
testcase_22 TLE -
testcase_23 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner
object no289{
    def main(args:Array[String]):Unit={
        val scan = new Scanner(System.in)
        val str = scan.next
        var res = 0
        for(i <- str){
            if(i.isDigit){
                res += i-'0'
            }
        }
        println(res)
    }
}
0