用C++输出固定的格式简直要被坑死的感觉。。。以后注意吧,,,用C++控制输出格式真不是一件方便的事,最好的方法便是C++与C共用。,,看我聪明吧,,,哈哈。。。
下面附上AC代码
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int t,j=0;
cin>>t;
while(t--)
{
j++;
string a;
cin>>a;
int len=a.length();
if(len>=4&&a[len-4]=='d'&&a[len-3]=='e'&&a[len-2]=='s'&&a[len-1]=='u')
{
a[len-4]='n';
a[len-3]='a';
a[len-2]='n';
a[len-1]='o';
a+="desu";
}
else a+="nanodesu";
printf("Case #%d: ",j);
cout<<a<<endl;
}
return 0;
}