#include<iostream>
#include<cstring>
#include<string>
#include<stack>
using namespace std;
string tenToR(long long int n,int r,string sstr){
char str[1005];
stack<long long int>s;
while(n){
s.push(n%r);
n = n/r;
}
int i = 0;
while(!s.empty()){
str[i++] = sstr[s.top()];
s.pop();
}
str[i] = '\0';
string st = str;
return st;
}
long long int change(string ss)
{
ss.erase(0,2);
long long int value = 0;
for(int i = 0; i < ss.length(); i++)
{
value = value*10 + (ss[i]-48);
}
return value;
}
int main()
{
int n;
string str;
long long int x;
cin>>n;
cin>>x;
cin>>str;
while(n--)
{
string tem;
cin>>tem;
string temp = tenToR(change(tem)^x,62,str);
string sstr = "BV" + temp;
cout<<sstr<<endl;
}
}
A 转换AV号(avtobv)
最新推荐文章于 2024-04-12 15:26:30 发布