結果

問題 No.1217 せしすせそ
ユーザー rutilicusrutilicus
提出日時 2020-09-06 10:36:56
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 304 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 13,876 ms
コンパイル使用メモリ 409,860 KB
実行使用メモリ 54,440 KB
最終ジャッジ日時 2023-08-19 13:35:04
合計ジャッジ時間 19,192 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 236 ms
52,908 KB
testcase_01 AC 238 ms
52,564 KB
testcase_02 AC 237 ms
52,620 KB
testcase_03 AC 239 ms
54,440 KB
testcase_04 AC 242 ms
52,512 KB
testcase_05 AC 242 ms
52,756 KB
testcase_06 AC 254 ms
52,576 KB
testcase_07 AC 304 ms
52,648 KB
testcase_08 AC 241 ms
52,644 KB
testcase_09 AC 252 ms
52,540 KB
testcase_10 AC 235 ms
52,568 KB
testcase_11 AC 239 ms
52,732 KB
testcase_12 AC 237 ms
52,900 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:8:21: warning: 'appendln(String?): kotlin.text.StringBuilder /* = java.lang.StringBuilder */' is deprecated. Use appendLine instead. Note that the new method always appends the line feed character '\n' regardless of the system line separator.
            builder.appendln("${i}to${s[i - 'a']}")
                    ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val s = readInputLine()

    for (i in 'a'..'z') {
        if (s[i - 'a'] != i) {
            builder.appendln("${i}to${s[i - 'a']}")
            break
        }
    }

    print(builder.toString())
}

fun readInputLine(): String {
    return readLine()!!
}
0