Hexadecimal
Time limit2sMemory limit128 MB
Convert a hexadecimal number of at most 6 digits into its decimal value and print it.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
You are given a non-negative integer written in hexadecimal. Write a program that converts it to decimal and prints the result.
Input
The first line contains one non-negative integer written in hexadecimal. Its length is at most 6, and each character is one of 0 through 9 or A through F. The letters A through F represent the values 10 through 15.
Output
Print the decimal value of the given hexadecimal number on the first line.