結果

問題 No.1020 Reverse
ユーザー 👑 H20H20
提出日時 2020-12-02 14:39:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 1,233 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 72,644 KB
最終ジャッジ日時 2023-10-11 11:26:33
合計ジャッジ時間 2,747 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,364 KB
testcase_01 AC 71 ms
71,340 KB
testcase_02 AC 73 ms
71,496 KB
testcase_03 AC 75 ms
71,476 KB
testcase_04 AC 71 ms
71,500 KB
testcase_05 AC 71 ms
71,212 KB
testcase_06 AC 72 ms
71,496 KB
testcase_07 AC 71 ms
71,316 KB
testcase_08 AC 71 ms
72,044 KB
testcase_09 AC 73 ms
71,488 KB
testcase_10 AC 76 ms
72,260 KB
testcase_11 AC 74 ms
72,104 KB
testcase_12 AC 73 ms
72,096 KB
testcase_13 AC 74 ms
72,248 KB
testcase_14 AC 73 ms
72,488 KB
testcase_15 AC 75 ms
72,644 KB
testcase_16 AC 75 ms
72,444 KB
testcase_17 AC 74 ms
72,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
S = input()
if (N-K+1)%2==1:
    print(S[K-1:]+S[0:K-1][::-1])
else:
    print(S[K-1:]+S[0:K-1])
0