#PCBTAM0000024. Mã Unicode dạng U+ (Unicode Hexadecimal Label)
Mã Unicode dạng U+ (Unicode Hexadecimal Label)
Unicode Hexadecimal Label
Version: Phuoc Hung OJ Extended
Problem Statement
Given a Unicode character , display its code point as a hexadecimal label: the prefix U+ followed by at least four uppercase hexadecimal digits (0–9, A–F). Pad the number with leading zeros when fewer than four digits are needed.
Do not truncate a hexadecimal representation longer than four digits.
Input
One line contains exactly one Unicode character .
Output
Print U+ followed by the uppercase hexadecimal code point, with at least four digits using leading zeros if needed.
Subtasks
- Subtask 1 (100 points): is a printable ASCII character or a character in
ĐắkLắkHàNộiBìnhAnViệtNamΩ€中.
Examples
Example 1
Input
A
Output
U+0041
Explanation. Decimal is hexadecimal 41; padding to four digits gives U+0041.
Example 2
Input
Đ
Output
U+0110
Explanation. Đ has code point U+0110, already four hexadecimal digits.
Example 3
Input
中
Output
U+4E2D
Explanation. 中 has code point U+4E2D, represented by uppercase hexadecimal 4E2D.