結果

問題 No.1020 Reverse
コンテスト
ユーザー kyo1
提出日時 2020-07-17 07:11:30
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
結果
WA  
実行時間 -
コード長 282 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,878 ms
コンパイル使用メモリ 193,340 KB
最終ジャッジ日時 2025-01-11 21:44:33
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, K;
  cin >> N >> K;
  string S;
  cin >> S;
  string res = "";
  for (int i = 0; i < N; i++) {
    res += S[(i + K - 1) % N];
  }
  cout << res << '\n';
  return 0;
}
0