結果

問題 No.163 cAPSlOCK
ユーザー rutilicusrutilicus
提出日時 2020-08-30 21:16:07
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 306 ms / 5,000 ms
コード長 277 bytes
コンパイル時間 10,710 ms
コンパイル使用メモリ 426,892 KB
実行使用メモリ 57,120 KB
最終ジャッジ日時 2024-04-27 13:19:51
合計ジャッジ時間 18,044 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 305 ms
57,056 KB
testcase_01 AC 303 ms
56,880 KB
testcase_02 AC 301 ms
57,016 KB
testcase_03 AC 300 ms
56,856 KB
testcase_04 AC 300 ms
56,924 KB
testcase_05 AC 302 ms
56,904 KB
testcase_06 AC 293 ms
56,892 KB
testcase_07 AC 292 ms
56,832 KB
testcase_08 AC 295 ms
56,780 KB
testcase_09 AC 296 ms
56,832 KB
testcase_10 AC 296 ms
57,120 KB
testcase_11 AC 300 ms
57,068 KB
testcase_12 AC 294 ms
56,960 KB
testcase_13 AC 292 ms
56,872 KB
testcase_14 AC 306 ms
56,968 KB
testcase_15 AC 303 ms
56,848 KB
testcase_16 AC 299 ms
56,904 KB
testcase_17 AC 293 ms
56,900 KB
testcase_18 AC 292 ms
56,936 KB
testcase_19 AC 302 ms
56,772 KB
testcase_20 AC 298 ms
56,844 KB
testcase_21 AC 295 ms
56,892 KB
testcase_22 AC 297 ms
56,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:13: 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(s.map { if (it.isLowerCase()) it.toUpperCase() else it.toLowerCase() }.joinToString(""))
            ^
Main.kt:6:55: warning: 'toUpperCase(): Char' is deprecated. Use uppercaseChar() instead.
    builder.appendln(s.map { if (it.isLowerCase()) it.toUpperCase() else it.toLowerCase() }.joinToString(""))
                                                      ^
Main.kt:6:77: warning: 'toLowerCase(): Char' is deprecated. Use lowercaseChar() instead.
    builder.appendln(s.map { if (it.isLowerCase()) it.toUpperCase() else it.toLowerCase() }.joinToString(""))
                                                                            ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val s = readInputLine()

    builder.appendln(s.map { if (it.isLowerCase()) it.toUpperCase() else it.toLowerCase() }.joinToString(""))

    print(builder.toString())
}

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