GO Solution For UVa 10473 - Simple Base Conversion. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

In this problem you are asked to write a simple base conversion program. You will be given a hexadecimal or decimal integer number as input. You will have to output the corresponding decimal or hexadecimal number. Hexadecimal numbers always starts with a ‘0x’ and all other numbers are to be consider

...

You can find the full details of the problem Simple Base Conversion at UVa Online Judge

Sample Input

2147483647
4
7
44
0x80685
-1

Sample Output

0x7FFFFFFF
0x4
0x7
0x2C
525957

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985