結果
| 問題 | 
                            No.1020 Reverse
                             | 
                    
| コンテスト | |
| ユーザー | 
                             67oYG9nh2YMmIci
                         | 
                    
| 提出日時 | 2020-07-20 12:05:38 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 224 bytes | 
| コンパイル時間 | 266 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 24,436 KB | 
| 最終ジャッジ日時 | 2024-12-23 11:36:30 | 
| 合計ジャッジ時間 | 24,628 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 8 TLE * 7 | 
ソースコード
N,K=map(int,input().split())
s=input()
S=[]
T=[]
for i in range(len(s)):
    S.append(s[i])
for i in range(0,N+1-K):
    #S[i]からS[i+K-1]を並び替える
    T=S[i:i+K]
    T.reverse()
    S[i:i+K]=T
print("".join(S))
            
            
            
        
            
67oYG9nh2YMmIci