結果
問題 | No.1217 せしすせそ |
ユーザー |
![]() |
提出日時 | 2020-09-06 10:36:56 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 314 ms / 2,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 13,397 ms |
コンパイル使用メモリ | 433,228 KB |
実行使用メモリ | 51,016 KB |
最終ジャッジ日時 | 2024-11-29 06:44:15 |
合計ジャッジ時間 | 18,555 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
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']}") ^
ソースコード
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()!! }