-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathanktrain.cpp
More file actions
51 lines (46 loc) · 980 Bytes
/
anktrain.cpp
File metadata and controls
51 lines (46 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include<bits/stdc++.h>
#define MAX 100000
#define DEBUG(x) do { std::cout << #x << ": " << x << std::endl; } while (0)
using namespace std;
int main(){
int t,n,i,j,x;
char ch;
cin>>t;
while(t--){
cin>>n;
x=n%8;
if(x==1){
ch='l';
cout<<n+3<<"LB\n";
}
else if(x==2){
ch='m';
cout<<n+3<<"MB\n";
}
else if(x==3){
ch='u';
cout<<n+3<<"UB\n";
}
else if(x==4){
ch='s';
cout<<n-3<<"LB\n";
}
else if(x==5){
ch='l';
cout<<n-3<<"MB\n";
}
else if(x==6){
ch='m';
cout<<n-3<<"UB\n";
}
else if(x==7){
ch='u';
cout<<n+1<<"SU\n";
}
else if(x==0){
ch='s';
cout<<n-1<<"SL\n";
}
}
return 0;
}