Why is this code compiled error?
There is no problem with local compilation, but why do compilation errors occur after submission?
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
int k;
cin >> s >> k;
int l=s.length();
for (int i=0;i<l;i++)
cout << char((s[i]+k-65)%26+65);
cout << endl;
return 0;
}