結果
問題 | No.1020 Reverse |
ユーザー |
![]() |
提出日時 | 2020-07-17 07:11:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 282 bytes |
コンパイル時間 | 1,878 ms |
コンパイル使用メモリ | 193,340 KB |
最終ジャッジ日時 | 2025-01-11 21:44:33 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 8 |
ソースコード
#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; }