結果
問題 |
No.1020 Reverse
|
ユーザー |
|
提出日時 | 2020-04-11 19:31:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 220 ms / 2,000 ms |
コード長 | 262 bytes |
コンパイル時間 | 79 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,264 KB |
最終ジャッジ日時 | 2024-09-19 07:14:51 |
合計ジャッジ時間 | 3,163 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
n,k = map(int,input().split()) s = input() if (n-k+1) % 2 == 0: for i in range(n): print(s[(k+i-1)%n],end='') else: for i in range(n): if i <= n-k: print(s[(k+i-1)%n],end='') else: print(s[n-i-1],end='')