結果

問題 No.1020 Reverse
ユーザー raven7959raven7959
提出日時 2021-09-07 08:01:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 119 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 72,540 KB
最終ジャッジ日時 2023-08-24 13:21:49
合計ジャッジ時間 2,739 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,404 KB
testcase_01 AC 73 ms
71,356 KB
testcase_02 AC 74 ms
71,344 KB
testcase_03 AC 73 ms
71,192 KB
testcase_04 AC 75 ms
71,400 KB
testcase_05 AC 74 ms
71,616 KB
testcase_06 AC 74 ms
71,112 KB
testcase_07 AC 71 ms
71,492 KB
testcase_08 AC 72 ms
72,044 KB
testcase_09 AC 70 ms
71,516 KB
testcase_10 AC 72 ms
72,356 KB
testcase_11 AC 70 ms
72,264 KB
testcase_12 AC 71 ms
72,268 KB
testcase_13 AC 71 ms
71,888 KB
testcase_14 AC 70 ms
72,260 KB
testcase_15 AC 73 ms
72,536 KB
testcase_16 AC 73 ms
72,540 KB
testcase_17 AC 73 ms
72,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
s=input()
if (n+k)%2==1:
    print(s[k-1:]+s[:k-1])
else:
    print(s[k-1:]+s[:k-1][::-1])
0