【一道很简单的ACM题,求大神看看我错在哪儿了,C++YoumusthaveheardofanancientencryptioncalledCaesarcipheror'shiftcipher'.Thatis,giventheplaintextandanumberD,youshouldreplaceeverycharactercintheplaintextwithan】
一道很简单的ACM题,求大神看看我错在哪儿了,C++
YoumusthaveheardofanancientencryptioncalledCaesarcipheror'shiftcipher'.Thatis,giventheplaintextandanumberD,youshouldreplaceeverycharactercintheplaintextwithanothercharacterwhichisDplacesaftercinthealphabet.Forexample,ifD=2,youshouldreplace'a'with'c',replace'b'with'd',...replace'y'with'a',andreplace'z'with'b'.
GiventheplaintextandD,youshouldoutputtheciphertext.
InputThefirstlineisanintegerT,thenumberoftestcases.ThenTcasesfollows.
Eachcasecontainsonlyoneline,consistsoftheplaintextandthenumberD,separatedbyaspace.Youcanassumethereareonlylowercaselettersintheplaintext,andthelengthisnomorethan100.0≤D>a)
{
for(i=0;i>s>>n;
intl=strlen(s);
for(intj=0;j

