結果
問題 |
No.1020 Reverse
|
ユーザー |
![]() |
提出日時 | 2020-05-04 21:32:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 168 bytes |
コンパイル時間 | 432 ms |
コンパイル使用メモリ | 82,132 KB |
実行使用メモリ | 89,960 KB |
最終ジャッジ日時 | 2024-06-25 00:14:41 |
合計ジャッジ時間 | 2,569 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 15 |
ソースコード
N, K = map(int, input().split()) S = list(input()) f = S[K-1:] r =S[:K-1] if (N - K + 1) % 2 == 0 else list(reversed(S[:K-1])) print(f) print(r) print(''.join(f + r))