結果

問題 No.289 数字を全て足そう
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2019-11-09 15:21:43
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 356 ms / 1,000 ms
コード長 100 bytes
コンパイル時間 10,940 ms
コンパイル使用メモリ 412,768 KB
実行使用メモリ 53,636 KB
最終ジャッジ日時 2023-10-13 07:15:07
合計ジャッジ時間 19,990 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 271 ms
52,732 KB
testcase_01 AC 274 ms
52,780 KB
testcase_02 AC 272 ms
52,664 KB
testcase_03 AC 272 ms
52,796 KB
testcase_04 AC 274 ms
52,784 KB
testcase_05 AC 301 ms
53,204 KB
testcase_06 AC 297 ms
52,892 KB
testcase_07 AC 353 ms
53,540 KB
testcase_08 AC 354 ms
53,560 KB
testcase_09 AC 299 ms
53,352 KB
testcase_10 AC 307 ms
52,956 KB
testcase_11 AC 319 ms
53,456 KB
testcase_12 AC 349 ms
53,416 KB
testcase_13 AC 305 ms
53,184 KB
testcase_14 AC 356 ms
53,352 KB
testcase_15 AC 324 ms
53,064 KB
testcase_16 AC 311 ms
53,376 KB
testcase_17 AC 352 ms
53,636 KB
testcase_18 AC 355 ms
53,520 KB
testcase_19 AC 325 ms
53,064 KB
testcase_20 AC 356 ms
53,316 KB
testcase_21 AC 273 ms
52,672 KB
testcase_22 AC 355 ms
53,404 KB
testcase_23 AC 321 ms
53,088 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:82: warning: 'toInt(): Int' is deprecated. Conversion of Char to Number is deprecated. Use Char.code property instead.
fun main(){println(readLine()!!.replace(Regex("[^0-9]"),"").toCharArray().map{it.toInt()-48}.sum())}
                                                                                 ^

ソースコード

diff #

fun main(){println(readLine()!!.replace(Regex("[^0-9]"),"").toCharArray().map{it.toInt()-48}.sum())}
0