This commit is contained in:
HuangHai
2025-08-30 18:35:01 +08:00
commit 1f397eca87
6258 changed files with 1487241 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
typedef long long LL;
string str = "0123456789ABCDEF";
int main() {
//十六进制转十进制
int n = 114514;
//容器
vector<string> v;
//类似于数位分离
while (n) {
int a = n % 16;
v.push_back(str.substr(a, 1));
n /= 16;
}
//反着输出
for (int i = v.size() - 1; i >= 0; i--) cout << v[i];
return 0;
}