想知道有哪些测试数据
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
string line="zzzzzz";
int L,N;
cin>>L>>N;
if(N<0)
{
int m=pow(26,L);
N=m+N;
}
int index=L-1,help_1=N,help_2;
while(true)
{
if(N==0)
{
line="aaaaaa";
break;
}
help_2=help_1%26;
help_1=help_1/26;
if(index==L-1 && help_2!=0)
line[index]-=help_2-1;
if(index!=L-1 && help_2!=0)
line[index]-=help_2;
if(help_2==0)
{
line[index]='a';
line[index-1]-=help_1-1;
break;
}
index--;
if(help_1<26)
{
if(index==L-1)
line[index]-=help_1-1;
else
line[index]-=help_1;
break;
}
}
for(int i=0;i<L;i++)
cout<<line[i];
return 0;
}