For this Question: The time stone is hidden inside a sacred box which has a lock of N different rings and each ring has 0-9 serially on it. Initially, all N- rings together show an N- digit integer but there is a particular code only that can open the lock. You can rotate each ring any number of times in either direction. You have to find the minimum number of rotations done on rings of the lock to open the lock.First line contains the integer N.
Second line contains a string that depicts the digit on rings
Third line contains a string that depicts the unlock code

Constraint :
0 <= digit on each ring <= 9
1 <= |String| <= 100000Print the minimum rotation of rotations done on the rings to unlock the box.Sample Input:-
4
2345
5432

Sample Output:-
8

Explanation:-
1st ring is rotated thrice as 2- >3- >4- >5
2nd ring is rotated once as 3- >4
3rd ring is rotated once as 4- >3
4th ring is rotated thrice as 5- >4- >3- >2

Sample Input:-
4
1919
0000

Sample Output:-
4, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
string a,b;
cin>>a>>b;
int ans=0;
for(int i=0;i<n;i++){
    ans+=min(abs(a[i]-b[i]),10-abs(a[i]-b[i]));
}
cout<<ans;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?