結果
| 問題 |
No.1020 Reverse
|
| コンテスト | |
| ユーザー |
ohara_n
|
| 提出日時 | 2020-04-10 21:56:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 189 bytes |
| コンパイル時間 | 111 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2024-09-15 20:16:56 |
| 合計ジャッジ時間 | 3,871 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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