进制转换
#include<bits/stdc++.h>
using namespace std;
int n;
string s;
int main(){
cin >> n;
s="";
while(n){
s=char(n%26+'A'-1)+s;
n/=26;
}
cout << s;
return 0;
}
蓝桥真题 文章被收录于专栏
蓝桥真题的题解
#include<bits/stdc++.h>
using namespace std;
int n;
string s;
int main(){
cin >> n;
s="";
while(n){
s=char(n%26+'A'-1)+s;
n/=26;
}
cout << s;
return 0;
}
蓝桥真题的题解
相关推荐