题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2081
之前就遇到过输入单个数字的题,这次写的时候又忘了
需要写cin.get()-‘0’,按字符输入,然后转化成数字
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int a[12];
while(n--)
{
getchar();
for(int i=1; i<=11; i++)
a[i]=cin.get()-'0';
cout<<'6';
for(int j=7; j<=11; j++)
cout<<a[j];
cout<<endl;
}
return 0;
}