結果
| 問題 |
No.1020 Reverse
|
| コンテスト | |
| ユーザー |
futago0118
|
| 提出日時 | 2020-07-10 14:39:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 285 bytes |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 18,212 KB |
| 最終ジャッジ日時 | 2024-10-10 19:51:12 |
| 合計ジャッジ時間 | 4,316 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 TLE * 1 -- * 10 |
ソースコード
N,K = map(int,input().split())
s = "z"
S = input()
s += S
#print(s)
for i in range(N-K+1):
#if i == 0:
s = s[:i+1]+s[i+K:i:-1]+s[i+K+1:]
#print(s)
#else:
# print(S[:i],S[i+K-1:0:-1])
# S = S[:i]+ S[i+K-1:i:-1]+S[i+K:]
# print(S)
print(s[1:])
futago0118