Loading Similar Posts
Question 1 Solution
void solve()
{
string k,s;
cin>>k>>s;
int n=k.length();
int m=s.length();
int A[n];
for(int i=0;i<n;i++)
A[i]=k[i]-'a';
//f(i,n)
//cout<<A[i]<<" ";
cout<<endl;
string ans;
int i=0;
for(int j=0;j<m;j++)
{
int x=((s[j]-'a')+A[i%n])%26;
ans+=char('a'+x);
i++;
}
cout<<ans<<endl;
}