#abc271a. A - 484558

A - 484558

Score : 100100 points

问题陈述

在十六进制系统中,除了使用数字0123456789外,还使用对应于10,11,12,13,1410,11,12,13,141515的数字ABCDEF。因此,每介于00255255之间的整数都用一个或两个数字表示。

例如,001212分别用一个数字的十六进制数0C表示;而9999255255则分别用两个数字的十六进制数63FF表示。

给定一个介于00255255之间的整数NN,请将其转换为一个精确的两位十六进制数,如果需要的话,在前面补零。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

In the hexadecimal system, where the digits ABCDEF corresponding to 10,11,12,13,1410,11,12,13,14, and 1515 are used in addition to 0123456789, every integer between 00 and 255255 is represented as a 11- or 22-digit numeral.
For example, 00 and 1212 are represented as 11-digit hexadecimal numerals 0 and C; 9999 and 255255 are represented as 22-digit hexadecimals 63 and FF.

Given an integer NN between 00 and 255255, convert it to an exactly two-digit hexadecimal numeral, prepending leading 0s if necessary.

Notes

The judge is case-sensitive. Specifically, you cannot use abcdef as hexadecimal digits instead of ABCDEF.

Constraints

  • 0N2550 \leq N \leq 255
  • NN is an integer.

Input

The input is given from Standard Input in the following format:

NN

Output

Print the answer.

Sample Input 1

99

Sample Output 1

63

9999 is represented as 63 in hexadecimal.

Sample Input 2

12

Sample Output 2

0C

1212 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