Permalink
Find file
30923d1 Jun 24, 2016
@KonstantinSimeonov @cuklev
54 lines (39 sloc) 720 Bytes

Hex to Decimal

Description

Using loops implement a javascript function that converts a hex number number to its decimal representation.

Input

  • The input will consists of a single line containing a single hexadecimal number as string.

Output

  • The output should consist of a single line - the decimal representation of the number as string.

Constraints

  • All numbers will be valid 64-bit integers.
  • Time limit: 0.1s
  • Memory limit: 16MB

Sample tests

Sample test 1

Input

['FE']

Output

254

Sample test 2

Input

['1AE3']

Output

6883

Sample test 3

Input

['4ED528CBB4']

Output

338583669684