Toggle navigation
NTHU Online Judge
Contest
Problem
Submit
Status
3
lawrence910426
Logout
11610 - 231001_10/16_quiz1-3
Status
|
Limits
Submit
×
Close
Limits
Time
Memory
Case 1
1 sec
32 MB
Case 2
1 sec
32 MB
Case 3
1 sec
32 MB
Case 4
1 sec
32 MB
Case 5
1 sec
32 MB
Description
Input an integer n, and print the hex number of n
1 ≦ n < 16
5
= 1,048,576
If n = 4040, the hex number of n is FC8, since
16
2
* F + 16
1
* C + 16
0
* 8
= 256
* 15 + 16
* 12 + 1 * 8
= 4040
You need to use the following table to help you print the result.
10
A
11
B
12
C
13
D
14
E
15
F
Input
An positive integer n < 1,048,576
Output
Output: The hexadecimal number of n
Output format:
Output must be the number or the capital letter(大寫英文字母).
Change a new line at the end.
Sample Input
Download
3 --- 1048575
Sample Output
Download
3 --------- FFFFF
Tags
Add Tag
Discuss