結果

問題 No.1020 Reverse
ユーザー da_louisda_louis
提出日時 2020-04-10 21:41:51
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 257 bytes
コンパイル時間 13,300 ms
コンパイル使用メモリ 411,888 KB
実行使用メモリ 58,872 KB
最終ジャッジ日時 2023-10-13 23:52:33
合計ジャッジ時間 21,300 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 301 ms
54,924 KB
testcase_01 AC 298 ms
52,608 KB
testcase_02 AC 294 ms
52,780 KB
testcase_03 WA -
testcase_04 AC 299 ms
52,796 KB
testcase_05 AC 301 ms
52,996 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 405 ms
57,020 KB
testcase_09 AC 412 ms
54,752 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 408 ms
56,800 KB
testcase_13 AC 413 ms
57,320 KB
testcase_14 WA -
testcase_15 AC 406 ms
54,664 KB
testcase_16 AC 413 ms
54,664 KB
testcase_17 AC 421 ms
57,472 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) = p1020()
         ^

ソースコード

diff #

fun main(args: Array<String>) = p1020()

fun p1020() {
    val (n, k) = readLine()!!.split(' ').map { it.toInt() }
    val s = readLine()!!

    if (n == k) return println(s.reversed())

    val answer = s.drop(k - 1) + s.take(k - 1)

    println(answer)
}
0