#include <iostream>
using namespace std;
long long n, x;
string s;
char c;
int main(){
cin >> n;
while(n != 0){
x = n % 16;
if(x < 10){
c = x + '0';
}else{
c = x + 'A' - 10;
}
s = c + s;
n = n / 16;
}
if(s == ""){
cout << 0;
}else{
cout << s;
}
}
十进制转十六进制
最新推荐文章于 2024-09-14 16:21:49 发布