#PCBTAM0000020. Khoảng cách mã hai ký tự (Code Point Distance)
Khoảng cách mã hai ký tự (Code Point Distance)
Code Point Distance
Version: Phuoc Hung OJ Extended
Problem Statement
Given Unicode characters and , let and denote their respective Unicode code points. Define their code point distance as the absolute difference between and .
Compute that distance. It is independent of the input order and equals for equal code points.
Input
The first line contains exactly one character ; the second contains exactly one character .
Output
Print the nonnegative integer .
Subtasks
- Subtask 1 (100 points): are printable ASCII characters or characters from
ĐắkLắkHàNộiBìnhAnViệtNamΩ€中.
Examples
Example 1
Input
A
C
Output
2
Explanation. A has code point and C has : .
Example 2
Input
Đ
A
Output
207
Explanation. Đ has code point and A has : the distance is .
Example 3
Input
0
0
Output
0
Explanation. Both characters are 0, so both have code point and their distance is .