結果
| 問題 |
No.1020 Reverse
|
| コンテスト | |
| ユーザー |
pete1288998
|
| 提出日時 | 2020-04-12 19:10:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 194 bytes |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 18,416 KB |
| 最終ジャッジ日時 | 2024-09-22 05:45:45 |
| 合計ジャッジ時間 | 4,488 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 TLE * 1 -- * 10 |
ソースコード
n,k=map(int,input().split())
s=input()
r=n-k+1
for i in range(r):
nw=''.join(list(reversed(s[i:i+k])))
if i<1:
s=nw+s[i+k:]
else:
s=s[:i]+nw+s[i+k:]
print(s)
pete1288998