你题目的解答代码如下:
s = input() n = 0 for c in s: if c.isupper(): n = n*26+ ord(c) - ord('A') + 1 print(n)
如有帮助,望采纳!谢谢!