結果

問題 No.1020 Reverse
ユーザー vwxyzvwxyz
提出日時 2022-09-07 00:46:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 310 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-05-01 18:57:18
合計ジャッジ時間 1,869 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 24 ms
10,752 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 WA -
testcase_04 AC 24 ms
10,752 KB
testcase_05 AC 25 ms
10,880 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 26 ms
11,008 KB
testcase_09 AC 25 ms
11,136 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 25 ms
11,368 KB
testcase_13 AC 25 ms
11,368 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 25 ms
11,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline=sys.stdin.readline
write=sys.stdout.write
from math import gcd as GCD
import math

def main(N,K):
    lst=[i for i in range(N)]
    for i in range(N-K+1):
        lst[i:i+K]=lst[i:i+K][::-1]
    return lst
N,K=map(int,readline().split())
S=readline().rstrip()
ans=S[K-1:]+S[:K-1]
print(ans)
0