LearnPy Hub
← Data Types & Casting problems
Hard

Hex to Decimal

Read a hexadecimal number (digits 0–9 and a–f, no prefix) and print its decimal value.

Input

One hex number.

Output

The decimal value.

Sample 1

Input
ff
Output
255

Sample 2

Input
10
Output
16
solution.py
Output appears here
Hex to Decimal · Python practice problem · LearnPy Hub