結果
問題 |
No.1020 Reverse
|
ユーザー |
![]() |
提出日時 | 2022-09-07 00:46:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 245 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2024-11-22 00:58:21 |
合計ジャッジ時間 | 1,970 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 8 |
ソースコード
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)