• + 0 comments

    Short C++ solution

    #include <iostream>
    using namespace std;
    
    
    int main() {
        int e;
        string input;
        cin >> input >> e;
        for (int i=0; i < input.length(); ++i)
            cout << to_string((input[i] - '0' + e) % 10);
        return 0;
    }