1 solutions
-
0
C :
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<math.h> char s[10001],f[1]; int main(){ long long n,i; scanf("%lld",&n); if(n==0){ printf("%d",0); return 0; } while(n!=0){ if(n%16>=10){ f[0] = n%16-10+'A'; }else{ f[0] = n%16+'0'; } strcat(s,f); n = n/16; } for(i=strlen(s)-1;i>=0;i--){ printf("%c",s[i]); } return 0; }Python :
a=int(input()) print(hex(a)[2:].upper())
- 1
Information
- ID
- 444
- Time
- 1000ms
- Memory
- 16MiB
- Difficulty
- 10
- Tags
- # Submissions
- 6
- Accepted
- 2
- Uploaded By