結果

問題 No.1020 Reverse
ユーザー akitsugu777akitsugu777
提出日時 2020-11-26 11:35:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 196 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-10-01 03:16:49
合計ジャッジ時間 4,185 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,920 KB
testcase_01 AC 15 ms
7,816 KB
testcase_02 AC 15 ms
7,776 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
S = input()

for i in range(len(S)):
    if i+K-1 >= len(S):
        break
    else:
        S = list(S)
        S[i], S[i+K-1] = S[i+K-1], S[i]

print(''.join(S))
0