fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. using namespace std;
  5. string inttostr(long long int n){
  6. char temp[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  7. string ans = "";
  8. while(n>0){
  9. ans += temp[n%62];
  10. n=n/62;
  11. }
  12. reverse(ans.begin(),ans.end());
  13. return ans;
  14. }
  15.  
  16.  
  17. int main() {
  18. //code
  19. int t;
  20. cin>>t;
  21. for(int j=0;j<t;j++){
  22. long long int n;
  23. cin>>n;
  24. cout<<inttostr(n)<<endl;
  25. }
  26. return 0;
  27. }
Success #stdin #stdout 0s 15240KB
stdin
1
12345
stdout
dnh