結果

問題 No.1020 Reverse
ユーザー GeckoちゃんGeckoちゃん
提出日時 2020-05-20 11:47:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 15,196 KB
最終ジャッジ日時 2024-04-09 22:54:17
合計ジャッジ時間 1,466 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 33 ms
10,624 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 35 ms
12,544 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 36 ms
13,404 KB
testcase_11 AC 37 ms
13,844 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 36 ms
14,100 KB
testcase_15 AC 37 ms
15,104 KB
testcase_16 AC 36 ms
15,196 KB
testcase_17 AC 35 ms
13,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

S=list(input())

"""
s=[0]*N
for i in range(0,N-K+1):
    for k, c in enumerate(reversed(list(S[i:i+K]))):
        S[i+k] = c
        s[i+k] += 1

print(S)
print(s)
"""


shift = max(K-1,0)
# print(shift)
a="".join(S[shift:]) + "".join(list(reversed(S[:shift])))
print(a)
0