結果

問題 No.1020 Reverse
ユーザー kept1994kept1994
提出日時 2022-05-09 02:37:14
言語 PyPy3
(7.3.13)
結果
TLE  
実行時間 -
コード長 258 bytes
コンパイル時間 1,900 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 96,264 KB
最終ジャッジ日時 2023-09-23 03:25:51
合計ジャッジ時間 4,816 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
75,880 KB
testcase_01 AC 76 ms
71,360 KB
testcase_02 AC 78 ms
71,156 KB
testcase_03 AC 78 ms
71,080 KB
testcase_04 AC 75 ms
71,504 KB
testcase_05 AC 77 ms
71,288 KB
testcase_06 AC 73 ms
71,244 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys
MOD = 998244353

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

if __name__ == '__main__':
    main()
0