#include <iostream>
using
namespace
std;
int
main()
{
int
k,i;
char
s[5];
cin>>k;
for
(;k>=26;)k%=26;
for
(i=0;i<5;i++)
{ cin>>s[i];
if
((
‘a‘
<=s[i]&&s[i]<=
‘z‘
)||(
‘A‘
<=s[i]&&s[i]<=
‘Z‘
))
{s[i]+=k;
if
((
‘z‘
<=s[i]&&s[i]<=
‘z‘
+k)||(
‘Z‘
<=s[i]&&s[i]<=
‘Z‘
+k))
s[i]-=26;
}
cout<<s[i];
}
cout<<endl;
return
0;
}
时间: 2024-10-05 04:44:56