#abc271a. A - 484558
A - 484558
Score : points
问题陈述
在十六进制系统中,除了使用数字0123456789
外,还使用对应于和的数字ABCDEF
。因此,每介于和之间的整数都用一个或两个数字表示。
例如,和分别用一个数字的十六进制数0
和C
表示;而和则分别用两个数字的十六进制数63
和FF
表示。
给定一个介于和之间的整数,请将其转换为一个精确的两位十六进制数,如果需要的话,在前面补零。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
In the hexadecimal system, where the digits ABCDEF
corresponding to , and are used in addition to 0123456789
, every integer between and is represented as a - or -digit numeral.
For example, and are represented as -digit hexadecimal numerals 0
and C
; and are represented as -digit hexadecimals 63
and FF
.
Given an integer between and , convert it to an exactly two-digit hexadecimal numeral, prepending leading 0
s if necessary.
Notes
The judge is case-sensitive. Specifically, you cannot use abcdef
as hexadecimal digits instead of ABCDEF
.
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
99
Sample Output 1
63
is represented as 63
in hexadecimal.
Sample Input 2
12
Sample Output 2
0C
is represented as C
in hexadecimal.
Since we ask you to convert it to a two-digit hexadecimal numeral, the answer is 0C
, where 0
is prepended to C
.
Sample Input 3
0
Sample Output 3
00
Sample Input 4
255
Sample Output 4
FF
update @ 2024/3/10 11:24:56