結果

問題 No.1070 Missing a space
ユーザー face4face4
提出日時 2021-04-09 00:35:24
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 292 ms / 1,000 ms
コード長 186 bytes
コンパイル時間 13,571 ms
コンパイル使用メモリ 411,264 KB
実行使用メモリ 52,900 KB
最終ジャッジ日時 2023-09-06 08:49:21
合計ジャッジ時間 16,902 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 290 ms
52,892 KB
testcase_01 AC 292 ms
52,896 KB
testcase_02 AC 291 ms
52,828 KB
testcase_03 AC 266 ms
50,204 KB
testcase_04 AC 288 ms
52,836 KB
testcase_05 AC 284 ms
52,752 KB
testcase_06 AC 291 ms
52,900 KB
testcase_07 AC 288 ms
52,856 KB
testcase_08 AC 291 ms
52,664 KB
testcase_09 AC 288 ms
52,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main(){
    println(readLine()!!.let{
        when(it.length){
            2 -> 1
            else -> it.length - 1 - it.substring(1..it.length-1).count({it=='0'})
        }
    })
}
0