Skip to main content
5 of 6
added 28 characters in body
user avatar
user avatar

Python, 74 64 56 55 bytes

x=input()
a=ord(max(x))-54
a+=7*(a<8)
print(int(x,a),a)

This is case-sensitive, requiring upper case letters, and crashes for invalid input (e.g. "$^$%!(&£%)())

This code gets the max letter in the string (z>x>y>...>b>a>9>8>...>2>1>0) and gets the largest base needed to represent it.

Change the 54 into a 76 to make it work for lowercase (but no longer upper case).

user34736