import re mail = raw_input() #mail = "123@hu.123@we.i.com" pattern_split = re.compile(r"([\w\d\&\=\+\$\,\;\?\/\-\_\.\!\~\*\'\(\)\#]*@[\w\d-]+?\.)") pattern = re.compile(r"([\w\d\&\=\+\$\,\;\?\/\-\_\.\!\~\*\'\(\)\#]*)@([\w\d-]+?)\.") res = "" for item in pattern_split.split(mail):     match = pattern.match(item)     if match:         g1 = match.group(1)         g2 = match.group(2)         if len(g2) <= 119 and len(g1) >= 3:             res += (g1[:-3:] + "***" +"@"+g2+".")         else:             res += item     else:         res += item print res 直接把输入输出就过了50%了。。。 然后这样过了,别人的代码
点赞 1

相关推荐

11-13 12:02
门头沟学院 Java
我要娶个什么名:好骂,好骂 别学计算机就行了
点赞 评论 收藏
分享
点赞 评论 收藏
分享
12-14 22:54
武汉大学 Java
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务