100分没拿到另一个测试点
查看原帖
100分没拿到另一个测试点
1192032
zcy30楼主2024/9/7 11:19
#include <iostream>
using namespace std;
long long n;
char trs(int x){
    if (x>9){
        return x-10+'A';
    }else{
        return x+'0';
    }
}
int main() {
    cin>>n;
    while (n>0){
        int t=n&0x7f;
        if (n>0x7f){
            t|=0x80;
        }
        cout<<trs(t>>4)<<trs(t&0xf)<<" ";
        n=(n>>7);
    }
    return 0;
}
2024/9/7 11:19
加载中...