結果

問題 No.1020 Reverse
ユーザー pypypymipypypymi
提出日時 2022-04-28 23:50:15
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 117 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 86,828 KB
実行使用メモリ 91,208 KB
最終ジャッジ日時 2023-09-10 17:03:10
合計ジャッジ時間 5,268 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,528 KB
testcase_01 AC 75 ms
71,520 KB
testcase_02 AC 75 ms
71,380 KB
testcase_03 AC 80 ms
71,248 KB
testcase_04 AC 75 ms
71,412 KB
testcase_05 AC 79 ms
71,284 KB
testcase_06 AC 76 ms
71,232 KB
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(0,n-k+1):
    s = s[:i] + s[i:i+k][::-1] + s[i+k:]
print(s)
0