#include <iostream>
using namespace std;
class partner{
string num;
string arr[8][2] = {{"3", "6UB"},{"6", "3UB"},{"2", "5MB"},{"5", "2MB"},{"1", "4LB"},{"4", "1LB"},{"7", "8SU"},{"8", "7SL"}};
public:
partner(string num){
this->num = num;
}
void findpartner(){
for(int i=0; i<8; i++){
if(num == arr[i][0]){
cout << arr[i][1] << endl;
break;
}
}
}
};
int main() {
int n;
string num;
cin >> n;
for(int i=0; i<n; i++){
cin >> num;
partner objname(num);
objname.findpartner();
}
return 0;
}
using namespace std;
class partner{
string num;
string arr[8][2] = {{"3", "6UB"},{"6", "3UB"},{"2", "5MB"},{"5", "2MB"},{"1", "4LB"},{"4", "1LB"},{"7", "8SU"},{"8", "7SL"}};
public:
partner(string num){
this->num = num;
}
void findpartner(){
for(int i=0; i<8; i++){
if(num == arr[i][0]){
cout << arr[i][1] << endl;
break;
}
}
}
};
int main() {
int n;
string num;
cin >> n;
for(int i=0; i<n; i++){
cin >> num;
partner objname(num);
objname.findpartner();
}
return 0;
}
No comments:
Post a Comment