結果

問題 No.1020 Reverse
ユーザー liny_tail
提出日時 2024-08-16 11:16:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 118 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 18,080 KB
最終ジャッジ日時 2024-08-16 11:16:50
合計ジャッジ時間 4,854 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 TLE * 1 -- * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int, input().split(' '))
S = input()
for i in range(N-K+1):
  S = S[:i] + S[i:i+K][::-1] + S[i+K:]
print(S)
0