結果
| 問題 |
No.1020 Reverse
|
| コンテスト | |
| ユーザー |
nehan_der_thal
|
| 提出日時 | 2020-04-10 21:46:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 118 bytes |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 53,760 KB |
| 最終ジャッジ日時 | 2024-09-15 19:50:38 |
| 合計ジャッジ時間 | 1,693 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 1 WA * 14 |
ソースコード
N, K = map(int, input().split())
s = input().strip()
b, c = s[:K-1], s[K-1:]
if (N-K) % 2:
b = b[::-1]
print(c+b)
nehan_der_thal