結果

問題 No.1020 Reverse
ユーザー yatsurugiyatsurugi
提出日時 2020-07-26 19:56:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 992 ms
コンパイル使用メモリ 86,660 KB
実行使用メモリ 72,488 KB
最終ジャッジ日時 2023-09-11 04:54:31
合計ジャッジ時間 3,678 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,348 KB
testcase_01 AC 76 ms
71,176 KB
testcase_02 AC 77 ms
71,352 KB
testcase_03 AC 79 ms
71,128 KB
testcase_04 AC 78 ms
71,140 KB
testcase_05 AC 77 ms
71,372 KB
testcase_06 AC 75 ms
71,252 KB
testcase_07 AC 76 ms
70,876 KB
testcase_08 AC 77 ms
71,928 KB
testcase_09 AC 77 ms
71,248 KB
testcase_10 AC 77 ms
72,184 KB
testcase_11 AC 76 ms
71,928 KB
testcase_12 AC 76 ms
72,144 KB
testcase_13 AC 75 ms
71,912 KB
testcase_14 AC 79 ms
71,896 KB
testcase_15 AC 77 ms
72,212 KB
testcase_16 AC 79 ms
72,488 KB
testcase_17 AC 77 ms
72,092 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