首页 > 其他 > 详细

Mispelling 1510

时间:2016-10-22 14:36:26      阅读:108      评论:0      收藏:0      [点我收藏+]

#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
int main()
{
 int t;
 cin>>t;
 int a = t;
 getchar();
 while(t--){
  string s;
  int n;
  cin>>n;
  getchar();
  getline(cin,s,‘\n‘);
  int len = s.length();
  string ss="";
  for(int i=0;i<n-1;i++){
   ss = ss + s[i];
  }
  for(int j=n;j<len;j++){
   ss=ss+ s[j];
  }
  
  cout<<a-t+1<<" "<<ss<<endl;
 }
}

Mispelling 1510

原文:http://www.cnblogs.com/sysu-eeman-yang/p/5987525.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!