結果
| 問題 |
No.3274 Arithmetic Right Shift
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-21 12:07:26 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 1,500 ms |
| コード長 | 345 bytes |
| コンパイル時間 | 612 ms |
| コンパイル使用メモリ | 69,860 KB |
| 実行使用メモリ | 7,712 KB |
| 最終ジャッジ日時 | 2025-09-21 12:07:28 |
| 合計ジャッジ時間 | 1,580 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
#include<iostream>
#include<vector>
#include<sstream>
#include<cassert>
using namespace std;
int N;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;cin>>T;
for(;T--;)
{
int K;
string S;
cin>>K>>S;
for(int i=0;i<min(K,(int)S.size());i++)
{
char c=S[0];
S=c+S.substr(0,S.size()-1);
}
cout<<S<<"\n";
}
}