【蓝桥杯】Excel地址
一.题目描述
二.问题分析
类似于进制转换
//Excel地址
#include <iostream>
#include <stack>
using namespace std;//const int N=1e2+2;
long long n;
stack <char> s;int main(int argc, const char * argv[]) {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin>>n;while(n>0){n--;s.push(n%26+'A');n/=26;}while(!s.empty()){cout<<s.top();s.pop();}cout<<'\n';return 0;
}