結果

問題 No.1020 Reverse
ユーザー c-yan
提出日時 2020-04-10 21:36:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 150 bytes
コンパイル時間 426 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,964 KB
最終ジャッジ日時 2024-09-15 19:31:04
合計ジャッジ時間 1,849 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 1 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
S = input()

if (N - K) % 2 == 1:
    print(S[K-1:] + ''.join(reversed(S[:K-1])))
else:
    print(S[K-1:] + S[:K-1])
0