結果
| 問題 | No.1020 Reverse |
| コンテスト | |
| ユーザー |
ohara_n
|
| 提出日時 | 2020-04-10 21:56:50 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 189 bytes |
| 記録 | |
| コンパイル時間 | 532 ms |
| コンパイル使用メモリ | 20,444 KB |
| 実行使用メモリ | 15,232 KB |
| 最終ジャッジ日時 | 2026-04-04 23:22:21 |
| 合計ジャッジ時間 | 8,912 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 TLE * 1 -- * 10 |
ソースコード
N,K=map(int,input().split())
S = input()
for i in range(1,N-K+2):
if i==1:
S= S[i-1:i+K-1][::-1] + S[i+K-1:]
else:
S= S[:i-1]+S[i-1:i+K-1][::-1] + S[i+K-1:]
print(S)
ohara_n