-
个人简介
好耶我终于知道十进制转x进制的万能代码了!
#include<bits/stdc++.h> using namespace std; stack<char> a; long long n; short jz = 2; int main() { cin >> n; while(n > 0) { int t = n % jz; if(t < 10) a.push(t + '0'); else if(t < 36) a.push(t - 10 + 'A'); else if(t < 62) a.push(t - 36 + 'a'); n /= jz; } while(!a.empty()) { cout << a.top(); a.pop(); } }
-
最近活动
This person is lazy and didn't join any contests or homework. -
Stat
-
Rating