結果
| 問題 |
No.3274 Arithmetic Right Shift
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-19 21:24:05 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 1,500 ms |
| コード長 | 342 bytes |
| コンパイル時間 | 2,913 ms |
| コンパイル使用メモリ | 276,224 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-19 21:24:18 |
| 合計ジャッジ時間 | 3,501 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int t;
cin>>t;
while(t--){
int k;
cin>>k;
string s;
cin>>s;
if(s.size()>=k+1){
for(int i=0;i<=k;i++)cout<<s[0];
for(int i=k+1;i<s.size();i++)cout<<s[i-k];
cout<<endl;
}else{
for(int i=0;i<s.size();i++)cout<<s[0];
cout<<endl;
}
}
}