F_Q_chicken @ 2023-02-16 19:12:59
#include<bits/stdc++.h>
using namespace std;
string n;
int a[100];
int sum;
int main(){
cin>>n;
int j=1;
for(int i=0;i<n.length();i++){
if(n[i]>='0'&&n[i]<='9'){
a[j++]=n[i]-'0';
}
}
for(int i=1;i<j;i++){
sum+=a[i]*i;
}
sum%=11;
if(sum==a[j])
printf("Right");
else{
for(int i=0;i<n.length()-1;i++){
cout<<char(n[i]);
}
cout<<sum;
}
return 0;
}
by Mark520 @ 2023-02-16 19:15:01
ns