1 #include <iostream> 2 #include <cstdio> 3 #include <vector> 4 #include <queue> 5 #include <map> 6 #include <stack> 7 #include <cstring> 8 #include <algorithm> 9 #include <cstdlib> 10 #define FOR(i,x,n) for(long i=x;i<n;i++) 11 #define ll long long int 12 #define INF 0x3f3f3f3f 13 #define MOD 1000000007 14 #define MAX_N 50005 15 16 using namespace std; 17 18 char a[200000000]; 19 20 int main() 21 { 22 //freopen("input1.txt", "r", stdin); 23 //freopen("data.out", "w", stdout); 24 ll n; 25 int cou=0; 26 scanf("%lld",&n); 27 if(n==0){ 28 printf("0"); 29 } 30 while(n!=0){ 31 int t=n%16; 32 if(t>=10){ 33 a[cou++]=n%16-10+'A'; 34 }else{ 35 a[cou++]=n%16-1+'1'; 36 } 37 n/=16; 38 } 39 for(int i=cou-1;i>=0;i--){ 40 printf("%c",a[i]); 41 } 42 //fclose(stdin); 43 //fclose(stdout); 44 return 0; 45 }