The time limit :1.0s Memory limit :512.0MB
Hexadecimal number is a kind of integer expression that is often used in program design . It has 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F common 16 Symbols , They represent decimal numbers respectively 0 to 15. The hexadecimal counting method is full 16 Into the 1, So decimal numbers 16 In hexadecimal it's 10, And decimal 17 In hexadecimal it's 11, And so on , Decimal 30 In hexadecimal it's 1E.
Give a nonnegative integer , Express it in hexadecimal form .
The input contains a non negative integer a, Represents the number to convert .0<=a<=2147483647
The output of this integer is 16 Hexadecimal said
30
1E
n=input()
k=hex(int(n))
print(k[2:].upper())
use hex() The hexadecimal number output by the function after conversion is represented by lowercase letters by default
In this case upper() Function to convert upper and lower case letters
m = 'qeddQSD'
m.upper()# All capitals
m.lower()# All letters lowercase
m.capitalize()# title case , Other letters are lowercase
m.title()# Capitalize the first letter of each word , Other lowercase
At the same time, the first two decimal symbols of the number shall be omitted during output
k = 'ox1e'
print(k[2:])