提出 #51807241


ソースコード 拡げる

Copy
fun main() {
val s = readln()
val set = mutableSetOf<String>()
for(i in s.indices) {
for(j in s.indices) {
if(j < i) {
continue
}
set.add(s.substring(i, j + 1))
}
}
println(set.size)
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
fun main() {
    val s = readln()

    val set = mutableSetOf<String>()

    for(i in s.indices) {
        for(j in s.indices) {
            if(j < i) {
                continue
            }

            set.add(s.substring(i, j + 1))
        }
    }
    println(set.size)
}

提出情報

提出日時
問題 B - Substring
ユーザ dhirabayashi
言語 Kotlin (Kotlin/JVM 1.8.20)
得点 200
コード長 292 Byte
結果 AC
実行時間 52 ms
メモリ 38320 KB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 13
セット名 テストケース
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt
ケース名 結果 実行時間 メモリ
00_sample_01.txt AC 42 ms 37536 KB
00_sample_02.txt AC 42 ms 37332 KB
00_sample_03.txt AC 40 ms 37320 KB
01_test_01.txt AC 41 ms 37480 KB
01_test_02.txt AC 51 ms 37728 KB
01_test_03.txt AC 51 ms 37940 KB
01_test_04.txt AC 48 ms 37948 KB
01_test_05.txt AC 52 ms 38268 KB
01_test_06.txt AC 50 ms 38044 KB
01_test_07.txt AC 51 ms 38320 KB
01_test_08.txt AC 50 ms 38168 KB
01_test_09.txt AC 50 ms 38140 KB
01_test_10.txt AC 51 ms 38028 KB


2025-03-14 (金)
02:06:07 +00:00