字符串数组:最大数(十六进制)[python][正则]
最大数
http://www.nowcoder.com/questionTerminal/ac72e27f34c94856bf62b19f949b8f36
python正则一行:
import re # python:3 print(max([int(i, base=16) if len(i) > 0 else 0 for i in re.split(r'[^0123456789ABCDEF]', input())]))
最大数
http://www.nowcoder.com/questionTerminal/ac72e27f34c94856bf62b19f949b8f36
python正则一行:
import re # python:3 print(max([int(i, base=16) if len(i) > 0 else 0 for i in re.split(r'[^0123456789ABCDEF]', input())]))
相关推荐