题目
#include<bits/stdc++.h>
using namespace std;
string s;
char base[100]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int main(){
cin>>s;
int len=s.size();string sum="";
// cout<<s<<endl;
for(int i=0;i<(len-len%3);i+=3){
int a=s[i],b=s[i+1],c=s[i+2];
int x=a/4,y=(a%4)*16+b/16,z=(b%16)*4+c/64,u=c%64;
sum+=base[x]+base[y]+base[z]+base[u];
}
// cout<<sum<<endl;
if(len%3==1){
int a=s[len-1];
int x=a/4,y=a%4*16;
sum+=base[x]+base[y]+"==";
}
if(len%3==2){
int a=s[len-2],b=s[len-1];
int x=a/4,y=a%4*16+b/16,z=b%16*4;
sum+=base[x]+base[y]+base[z]+"=";
}
cout<<sum;
return 0;
}