如何将一个八进制、十六进制的数转换成十进制?新手
DescriptionWrite a program to convert an input string that represents an octal integer or a hexadecimal integer to a decimal integer.
Input
The input is one line that begins with "0" or "0x", indicating an octal integer or a hexadecimal integer, respectively.
For a hexadecimal integer, it may contain uppercase letters and lowercase letters, e.g., both "0x3e5a" and "0x3E5a" are equivalent to 15962. Your program should carefully handle such a case.
这是问题 Ox3e5a 和 O 是怎么回事?这样的程序要怎么编?